Created
April 11, 2018 16:47
-
-
Save zhammer/e67c25331503ff2198b9618eefb73f50 to your computer and use it in GitHub Desktop.
Found it!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> n | |
YOU HAVE CRAWLED AROUND IN SOME LITTLE HOLES AND WOUND UP BACK IN THE | |
MAIN PASSAGE. | |
THERE IS A THREATENING LITTLE DWARF IN THE ROOM WITH YOU! | |
YOU'RE AT WITT'S END. | |
>>> pp(w.game.objects_here) | |
[] | |
>>> w.game.inventory | |
[<Object 2 lamp/headlamp/lantern 7f680c27ea58>, <Object 4 cage 7f680c27ec88>, <Object 8 bird 7f680c27ef28>, <Object 16 magazine/issue/spelunker/"spel 7f680c283470>, <Object 28 axe 7f680c283e10>, <Object 52 silver/bars 7f680c288780>] | |
>>> take(dwarf) | |
OK | |
>>> w.game.objects_here | |
[] | |
>>> w.game.inventory | |
[<Object 2 lamp/headlamp/lantern 7f680c27ea58>, <Object 4 cage 7f680c27ec88>, <Object 8 bird 7f680c27ef28>, <Object 16 magazine/issue/spelunker/"spel 7f680c283470>, <Object 17 dwarf/dwarves 7f680c283550>, <Object 28 axe 7f680c283e10>, <Object 52 silver/bars 7f680c288780>] | |
>>> drop(dwarf) | |
OK | |
>>> w.game.objects_here | |
[<Object 17 dwarf/dwarves 7f680c283550>] | |
>>> w.game.objects_here.prop | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
AttributeError: 'list' object has no attribute 'prop' | |
>>> w.game.objects_here[0] | |
<Object 17 dwarf/dwarves 7f680c283550> | |
>>> w.game.objects_here[0].prop | |
0 | |
>>> w.game.objects_here[0].messages | |
{} | |
>>> d | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/prompt.py", line 18, in __repr__ | |
output = self.game.do_command(self.words) | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 437, in do_command | |
self._do_command(words) | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 506, in _do_command | |
self.dispatch_command(words) | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 553, in dispatch_command | |
return self.do_motion(word1) | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 706, in do_motion | |
self.move_to() | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 186, in move_to | |
self.move_dwarves() | |
File "/bb/mbigd/mbig6213/personal/python-adventure/adventure/game.py", line 325, in move_dwarves | |
self.describe_location() | |
File "/bb/mbigd/mbig6213/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