Game Assignment Sample
You are not supposed to write a program that duplicates this
sample; the sample is provided simply to ensure that you have
an accurate idea of the kind of thing that is expected.
$ a.out
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn
To my left: a lawn and some trees
To my right: a lawn and some trees
Behind me: many trees
? help
These are the instructions that I understand
'left' turn to the left, remaining in the same place
'right' turn to the right, remaining in the same place
'uturn' turn right around, remaining in the same place
'walk' move forwards
'take X' pick up 'X', assuming it is in reach
'drop X' put down 'X', assuming I'm carrying it
'what' list the items I am carrying
'where X'
'exit' stop playing this silly game
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn
To my left: a lawn and some trees
To my right: a lawn and some trees
Behind me: many trees
? where gold
gold, location: a small, very dark, room
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn
To my left: a lawn and some trees
To my right: a lawn and some trees
Behind me: many trees
? left
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn and some trees
To my left: many trees
To my right: a lawn
Behind me: a lawn and some trees
? right
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn
To my left: a lawn and some trees
To my right: a lawn and some trees
Behind me: many trees
? move
command move not understood
my location: on a lawn beside some trees in front of an old house
In front of me: a lawn
To my left: a lawn and some trees
To my right: a lawn and some trees
Behind me: many trees
? walk
my location: on a lawn beside a small house
In front of me: the door
To my left: a lawn
To my right: a lawn
Behind me: a lawn and some trees
? walk
my location: in the doorway to a small house
In front of me: the entrance hall
Behind me: a lawn
? walk
my location: just inside the entrance of an old house
In front of me: a kitchen
To my left: what appears to be the sitting-room
To my right: a darkened room
Behind me: the door
? left
my location: just inside the entrance of an old house
In front of me: what appears to be the sitting-room
To my left: the door
To my right: a kitchen
Behind me: a darkened room
? walk
my location: a smelly dusty room full of old furniture and spiders
To my left, through a window: a lawn
Behind me: the entrance hall
items present: "piano": a broken-down piano (weight 1500, value 10)
? uturn
my location: a smelly dusty room full of old furniture and spiders
In front of me: the entrance hall
To my right, through a window: a lawn
items present: "piano": a broken-down piano (weight 1500, value 10)
? walk
my location: just inside the entrance of an old house
In front of me: a darkened room
To my left: a kitchen
To my right: the door
Behind me: what appears to be the sitting-room
? left
my location: just inside the entrance of an old house
In front of me: a kitchen
To my left: what appears to be the sitting-room
To my right: a darkened room
Behind me: the door
? walk
my location: an old and untidy kitchen
In front of me, through a window: some sort of clearing
Behind me: the entrance hall
items present: "kettle": a rusty iron kettle (weight 50, value 0)
? take kettle
my location: an old and untidy kitchen
In front of me, through a window: some sort of clearing
Behind me: the entrance hall
? uturn
my location: an old and untidy kitchen
In front of me: the entrance hall
Behind me, through a window: some sort of clearing
? walk
my location: just inside the entrance of an old house
In front of me: the door
To my left: a darkened room
To my right: what appears to be the sitting-room
Behind me: a kitchen
? walk
my location: in the doorway to a small house
In front of me: a lawn
Behind me: the entrance hall
? what
I am carrying: "kettle": a rusty iron kettle (weight 50, value 0)
my location: in the doorway to a small house
In front of me: a lawn
Behind me: the entrance hall
? drop kettle
my location: in the doorway to a small house
In front of me: a lawn
Behind me: the entrance hall
items present: "kettle": a rusty iron kettle (weight 50, value 0)
? walk
my location: on a lawn beside a small house
In front of me: a lawn and some trees
To my left: a lawn
To my right: a lawn
Behind me: the door
? what
I am carrying nothing
my location: on a lawn beside a small house
In front of me: a lawn and some trees
To my left: a lawn
To my right: a lawn
Behind me: the door
? where kettle
kettle, location: in the doorway to a small house
my location: on a lawn beside a small house
In front of me: a lawn and some trees
To my left: a lawn
To my right: a lawn
Behind me: the door
? uturn
my location: on a lawn beside a small house
In front of me: the door
To my left: a lawn
To my right: a lawn
Behind me: a lawn and some trees
? walk
my location: in the doorway to a small house
In front of me: the entrance hall
Behind me: a lawn
items present: "kettle": a rusty iron kettle (weight 50, value 0)
? exit
all over
You scored 0 points
and found 0 gold.
You lost. You loser.