Skip to content

Console adventure game. This game was one of the tasks in book "Learn Python the Hard Way" (learnpythonthehardway.org).

Notifications You must be signed in to change notification settings

ThePavolC/LPTHW-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LPTHW-Game

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).

How to run

> python src/example_game

Code

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

Tests

Run from top directory: > nosetests

Tests run all winning and killing scenarios.

About

Console adventure game. This game was one of the tasks in book "Learn Python the Hard Way" (learnpythonthehardway.org).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages