! Possible values for a kitten's state property: Constant HELD_STATE = 0; ! Being held Constant QUEEN_STATE = 1; ! Playing with the Red Queen Constant WOOL_STATE = 2; ! Playing with the worsted Constant CHAIR_STATE = 3; ! In the way of the chair Include "parser"; Include "verblib"; Include "grammar"; [ Initialise; location = Drawing_Room; StartDaemon(white_kitten); StartDaemon(black_kitten); print "^^^^^It's a cold winter day outside, but in the looking-glass house it's summer. All you need to do is pretend there's a way of getting through into it somehow...^^"; ]; [ Inside x y; do { x = parent(x); } until (x == 0 or y); if (x == 0) rfalse; ]; [ UntangleSub; "What curious ideas you have!"; ]; [ ReflectSub; if (second ~= mirror) "What a strange idea!"; if (noun == hearth or mirror || (player notin mantelpiece && player notin armchair)) "You can't see that in the looking-glass."; print "The looking-glass "; if (noun == player) print "Alice"; else print (name) noun; if (player in mantelpiece) " looks very misty and blurred."; print " looks just like the real "; if (noun == player) print "Alice"; else print (name) noun; " only all reversed, left for right."; ]; Extend "look" * "at" noun "in" noun -> Reflect; Extend "examine" * noun "in" noun -> Reflect; Verb "roll" "untangle" "wind" * noun -> Untangle * "up" noun -> Untangle * noun "up" -> Untangle; Verb "pet" "stroke" = "rub"; Object Drawing_Room "Drawing room" has light with name "snow", description "The gentle sound of snow against the window pane suggests that it's cold outside, and you're glad to be here in the warmth. The drawing-room is reflected in the large looking-glass on the wall above the mantelpiece, and a very comfortable room it is too, with a warm hearth, a soft rug and an arm-chair that you can curl up and sleep in.", before [; if (player notin Mantelpiece) rfalse; Exit,Go: if (noun == d_obj or out_obj) "That's not the way to get down from a mantelpiece!"; Examine,Enter,ThrowAt,ThrownAt,Reflect: ; default: if (inp1 ~= 1 && noun ~= 0 && Inside(noun,mantelpiece) == 0) "You can't reach ", (the) noun, " from up here."; if (inp2 ~= 1 && second ~= 0 && Inside(second,mantelpiece) == 0) "You can't reach ", (the) second, " from up here."; ];