From a16d73ba67f73b3625dae655990787b41dfb63c5 Mon Sep 17 00:00:00 2001 From: Dinko Galetic Date: Tue, 08 Jun 2010 22:56:18 +0000 Subject: Added classes Game_object, Direction and Player. Every object in the game should inherit from Game_object, including Direction and Player. --- (limited to 'library') diff --git a/library/pippy/scholar/scholar.py b/library/pippy/scholar/scholar.py index e69de29..1f7224f 100644 --- a/library/pippy/scholar/scholar.py +++ b/library/pippy/scholar/scholar.py @@ -0,0 +1,23 @@ +# TODO: separate into different files + +### classes + +class Game_object(object): + def __init__(self): + self.description = "Enter this for every object" + self.methods = ["examine", "look"] + self.aliases = [] + #self.ID = get_ID.next() + +class Direction(Game_object): + def __init__(self, name): + Game_object.__init__(self) + self.methods.append("go") + self.name = name + +class Player(Game_object): + def __init__(self, name): + Game_object.__init__(self) + self.name = name + self.position = "A room object goes here!" + self.known_commands = ["examine", "go"] -- cgit v0.9.1