Skip to content

Instantly share code, notes, and snippets.

View macloo's full-sized avatar
💭
Teaching some Python

Mindy McAdams macloo

💭
Teaching some Python
View GitHub Profile
@macloo
macloo / ex43_v1.py
Created January 30, 2014 01:00
Three iterations of a text-based game to learn object-oriented techniques in Python. Based on exercise 43 in Zed Shaw's book. I did 7 distinct iterations but there's no reason to show all of them. Probably this code is bad in many ways. But each one of these runs without errors.
# Exercise 43: Basic Object-Oriented Analysis and Design
# http://learnpythonthehardway.org/book/ex43.html
# STAGE 1 - this works
# only classes Map and Engine are really built
# each Scene child-class can be run
# start w/ skeleton from Zed, then build it out
class Scene(object):