Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinko Galetic <dgaletic@everflame.(none)>2010-06-08 22:56:18 (GMT)
committer Dinko Galetic <dgaletic@everflame.(none)>2010-06-08 22:56:18 (GMT)
commita16d73ba67f73b3625dae655990787b41dfb63c5 (patch)
tree332727f3fed952b38b448546ea64aa1f54e916e3
parente319178689d472b68686e1c0739abfff4a5adaa1 (diff)
Added classes Game_object, Direction and Player.
Every object in the game should inherit from Game_object, including Direction and Player.
-rw-r--r--library/pippy/scholar/scholar.py23
1 files changed, 23 insertions, 0 deletions
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"]