This is something like simple game engine and one short example game. This console adventure game was one of the tasks in book "Learn Python the Hard Way" (learnpythonthehardway.org).
> python src/example_game
Code consist of game engine:
- commands.py
- engine.py
- item.py
- map.py
- room.py
And files for example game:
- example_game.py (actual game)
- apple_item.py
- bed_item.py
- castle_room.py
- cave_room.py
- forrest_room.py
- money_item.py
- passage_room.py
- pathway_room.py
- pond_room.py
- rock_item.py
- stick_item.py
- torch_item.py
Run from top directory:
> nosetests
Tests run all winning and killing scenarios.