Skip to content

Instantly share code, notes, and snippets.

@zhammer
Created April 11, 2018 02:01
Show Gist options
  • Save zhammer/54bbcea326bccf748aa5a4402af7cd6e to your computer and use it in GitHub Desktop.
Save zhammer/54bbcea326bccf748aa5a4402af7cd6e to your computer and use it in GitHub Desktop.
import adventure
# help(adventure)
adventury.play()
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# NameError: name 'adventury' is not defined
adventure.play()
no
building
take(keys)
take(lamp)
eat(food)
take(bottle)
look
xyzzy
light(lamp)
xyzzy
out
east
east
leave
east
leave
w
w
n
n
valley
streamn
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# NameError: name 'streamn' is not defined
stream
stream
n
stream
drink
stream
n
n
n
n
valley
stream
e
e
e
e
e
e
e
e
bed
rock
s
drink
fill(bottle)
rock
open(grate)
look
take(grate)
grate
go
go(in)
# File "<stdin>", line 1
# go(in)
# ^
# SyntaxError: invalid syntax
enter
west
take(cage)
west
take(rod)
look
west
look
west
sing(bird)
touch(bird)
pet(bird)
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# NameError: name 'pet' is not defined
bottle(bird)
cage(bird)
feed(bird)
west
down
down
south
east
take(axe)
east
down
hit(dwarf)
throw(axe)
catch(dwarf)
inventory
catch(dwarf)
hit(dwarf)
choke(dwarf)
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# NameError: name 'choke' is not defined
take(dwarf)
up
up
down
take(axe)
hit(dwarf)
rod(Dwarf)
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# NameError: name 'Dwarf' is not defined
axe(dwarf)
drop(dwarf)
take(axe)
take(dwarf)
inventory
up
s
e
take(bird)
inventory
drop axe
# File "<stdin>", line 1
# drop axe
# ^
# SyntaxError: invalid syntax
drop(axe)
take(bird)
no
south
take(axe)
west
south
north
west
down
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# File "~/personal/python-adventure/adventure/prompt.py", line 18, in __repr__
# output = self.game.do_command(self.words)
# File "~/personal/python-adventure/adventure/game.py", line 437, in do_command
# self._do_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 506, in _do_command
# self.dispatch_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 553, in dispatch_command
# return self.do_motion(word1)
# File "~/personal/python-adventure/adventure/game.py", line 701, in do_motion
# self.move_to(move.action)
# File "~/personal/python-adventure/adventure/game.py", line 186, in move_to
# self.move_dwarves()
# File "~/personal/python-adventure/adventure/game.py", line 325, in move_dwarves
# self.describe_location()
# File "~/personal/python-adventure/adventure/game.py", line 379, in describe_location
# self.write(obj.messages[prop])
# KeyError: 0
down
throw axe
# File "<stdin>", line 1
# throw axe
# ^
# SyntaxError: invalid syntax
throw(axe)
east
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# File "~/personal/python-adventure/adventure/prompt.py", line 18, in __repr__
# output = self.game.do_command(self.words)
# File "~/personal/python-adventure/adventure/game.py", line 437, in do_command
# self._do_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 506, in _do_command
# self.dispatch_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 553, in dispatch_command
# return self.do_motion(word1)
# File "~/personal/python-adventure/adventure/game.py", line 701, in do_motion
# self.move_to(move.action)
# File "~/personal/python-adventure/adventure/game.py", line 186, in move_to
# self.move_dwarves()
# File "~/personal/python-adventure/adventure/game.py", line 325, in move_dwarves
# self.describe_location()
# File "~/personal/python-adventure/adventure/game.py", line 379, in describe_location
# self.write(obj.messages[prop])
# KeyError: 0
eat
east
down
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# File "~/personal/python-adventure/adventure/prompt.py", line 18, in __repr__
# output = self.game.do_command(self.words)
# File "~/personal/python-adventure/adventure/game.py", line 437, in do_command
# self._do_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 506, in _do_command
# self.dispatch_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 553, in dispatch_command
# return self.do_motion(word1)
# File "~/personal/python-adventure/adventure/game.py", line 701, in do_motion
# self.move_to(move.action)
# File "~/personal/python-adventure/adventure/game.py", line 186, in move_to
# self.move_dwarves()
# File "~/personal/python-adventure/adventure/game.py", line 325, in move_dwarves
# self.describe_location()
# File "~/personal/python-adventure/adventure/game.py", line 379, in describe_location
# self.write(obj.messages[prop])
# KeyError: 0
down
south
south
north
take(knife)
throw(axe)
take(dwarf)
east
north
south
take(gold)
throw(dwarf)
take(gold)
up
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# File "~/personal/python-adventure/adventure/prompt.py", line 18, in __repr__
# output = self.game.do_command(self.words)
# File "~/personal/python-adventure/adventure/game.py", line 437, in do_command
# self._do_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 506, in _do_command
# self.dispatch_command(words)
# File "~/personal/python-adventure/adventure/game.py", line 553, in dispatch_command
# return self.do_motion(word1)
# File "~/personal/python-adventure/adventure/game.py", line 769, in do_motion
# self.move_to()
# File "~/personal/python-adventure/adventure/game.py", line 186, in move_to
# self.move_dwarves()
# File "~/personal/python-adventure/adventure/game.py", line 325, in move_dwarves
# self.describe_location()
# File "~/personal/python-adventure/adventure/game.py", line 379, in describe_location
# self.write(obj.messages[prop])
# KeyError: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment