In this blog entry, dear reader, we examine the statemachine and treetop gems via an old standby, a Zork imitation. And, despite the title, you won’t find a grue.
$ ruby adventure.rb
This is the beginning. Like all tales, there's a beginning, a middle and an
end....
Paths lead n.
What do you want to do?
n
This is a path in the forest, it looks fairly well travelled. You see a
clearing to the east
Paths lead w, n, e, s.
What do you want to do?
e
This is a clearing. You can actually see the sky here. Compared to the deep
dark forest, it seems a relief. A path can be seen to the west.
Paths lead w, n, e, s.
You see the following: letter.
What do you want to do?
get letter
Ok, you pick up the letter.
What do you want to do?
w
This is a path in the forest, it looks fairly well travelled. You see a
clearing to the east
Paths lead w, n, e, s.
What do you want to do?
w
You're lost in the depths of the forest. You're not sure where you are, nor how
to get out of there.
Paths lead w, n, e, s.
What do you want to do?
quit
Continue reading ‘A “grue”some look at Statemachine and Treetop’