examples/example1.rb in room-0.1.0 vs examples/example1.rb in room-0.1.1

- old
+ new

@@ -95,31 +95,31 @@ if have? :pencil @sharpened_pencil = true lose :pencil "You whittle the pencil to nothing." else - unknown_command + huh? end end dup :sharpen_the_pencil def look_pencil_sharpener if have? :pencil "That's a mighty fine pencil sharpener. Red." else - unknown_command + huh? end end def jump_into_chute if @sharpened_pencil "Throwing caution to the wind, you jump into the chute and die." | "Just kidding! You find yourself on skis," | "hurtling down a snow-covered slope at break-neck speed!" | go("skiing1") else - unknown_command + huh? end end dup :jump_into_the_chute def eat_XXX item @@ -137,18 +137,22 @@ else "You stub your toe on something sharp. It feels like a pencil." end) end + def stub_toe + "You already did that!" + end + def open_door "The door won't budge." end dup :open_the_door def look_pencil if @got_pencil - unknown_command + huh? else "It's too dark to see, so you settle for stubbing your" | "foot on it again. Definitely a No. 3 pencil." | "Maybe you should 'get' it." end @@ -161,9 +165,10 @@ take :pencil @got_pencil = true "Awesome, a pencil! You place the pencil in your pocket." end end + dup :get_the_pencil def exit "You somehow manage to leave the closet." | go("bedroom") end