diff --git a/src/paradise.modal b/src/paradise.modal index 62ba8dd..b7924a7 100644 --- a/src/paradise.modal +++ b/src/paradise.modal @@ -2,6 +2,8 @@ <> (print ?x) (?(?: ?:) ?x) +?(?-) (TODO: Create a generic rule that prints up to 3 vessels.) + ?(?-) (Sight) <> (:?p ((sight > $ :?V ?C) ((:?i ?I) ((:?j ?J) ((:?k ?K) ?r))))) ( @@ -24,19 +26,19 @@ ?(?-) (Carry) <> (carry > $ :?V ((:?i ?I) ((:?j ?J) ((:?k ?K) ?r)))) ( - print (You carry a ?i, a ?j and a ?k.\n\n) + print (You carry a ?i, a ?j and a ?k.\n\n|\s) > $ :?V ((:?i ?I) ((:?j ?J) ((:?k ?K) ?r))) ) <> (carry > $ :?V ((:?i ?I) ((:?j ?J) ?r))) ( - print (You carry a ?i and a ?j.\n\n) + print (You carry a ?i and a ?j.\n\n|\s) > $ :?V ((:?i ?I) ((:?j ?J) ?r)) ) <> (carry > $ :?V ((:?i ?I) ?r)) ( - print (You carry a ?i.\n\n) + print (You carry a ?i.\n\n|\s) > $ :?V ((:?i ?I) ?r) ) <> (carry > $ :?V ?C) ( - print \n\n + print \n\n|\s > $ :?V ?C ) @@ -55,7 +57,7 @@ <> ((:?V ?C) ((<- ?q :?v ?c) ?r)) ((<- ?q :?V ?C) ((:?v ?c) ?r)) <> ((:?V ?C) ((<- ?q :?v ?c) ?r)) ((<- ?q :?v ?c) ((:?V ?C) ?r)) -?(?-) (Parade Primitives) +?(?-) (Create) <> (((create (?q ())) parse sight > $ :?V ?C) ?r) ( print (You created a ?q.\n) @@ -164,7 +166,9 @@ sight > $ :?q ) -?(?-) (Note, TODO) +?(?-) (Look) + +?(?-) (Note) <> ((note ?q) parse) () @@ -172,18 +176,17 @@ ?(?: ?:) (You fell asleep.\n) ) -?(?-) (Routing) - -<> ((?x ?q) parse) ( - print (Unknown action: ?x \n) -) - -<> (() parse) () - ?(?-) (Input loop) +<> (() parse) () +<> ((?x ?q) parse) (print (Unknown action: ?x \n)) <> (() input) () -<> (?x input) (?(?* ((?*))) ?x parse) -<> (?~ $ :?V) ((?~) input sight > $ :?V) +<> (?x input) ( + ?(?: ?:) \n + ?(?* ((?*))) ?x parse +) +<> (?~ $ :?V) ( + (?~) input sight > $ :?V +) -(:library ((sight > $ :ghost ()) ((:house ((:teapot ((:moth ()) ())) ())) ()))) +(:library ((sight > $ :ghost ()) ((:haunted\shouse ((:teapot ((:moth ()) ())) ())) ())))