Mercurial > pyntnclick
annotate gamelib/main.py @ 641:dae56fc7b902 pyntnclick
Remove a hacked resorce from TextWidget
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 12 Feb 2012 01:41:02 +0200 |
parents | 974cc69d3762 |
children | c77d6aa29bee |
rev | line source |
---|---|
554
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
1 import scenes |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
2 |
599
2d2ea51b73ad
Move menu.py and endscreen.py to gamelib. Add default versions for new games
Neil Muller <neil@dip.sun.ac.za>
parents:
554
diff
changeset
|
3 from menu import MenuScreen |
2d2ea51b73ad
Move menu.py and endscreen.py to gamelib. Add default versions for new games
Neil Muller <neil@dip.sun.ac.za>
parents:
554
diff
changeset
|
4 from endscreen import EndScreen |
2d2ea51b73ad
Move menu.py and endscreen.py to gamelib. Add default versions for new games
Neil Muller <neil@dip.sun.ac.za>
parents:
554
diff
changeset
|
5 |
554
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
6 from pyntnclick.main import GameDescription |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
7 |
553
ebb2efcb4ea7
Create a re-usable main function.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
8 |
554
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
9 class SuspendedSentence(GameDescription): |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
10 |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
11 INITIAL_SCENE = scenes.INITIAL_SCENE |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
12 SCENE_LIST = scenes.SCENE_LIST |
614
974cc69d3762
Special cases aren't special enough to be named special.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
612
diff
changeset
|
13 SCREENS = { |
608
a25cd1c6335a
Pass screens through engine by name
Neil Muller <neil@dip.sun.ac.za>
parents:
599
diff
changeset
|
14 'menu': MenuScreen, |
a25cd1c6335a
Pass screens through engine by name
Neil Muller <neil@dip.sun.ac.za>
parents:
599
diff
changeset
|
15 'end': EndScreen, |
a25cd1c6335a
Pass screens through engine by name
Neil Muller <neil@dip.sun.ac.za>
parents:
599
diff
changeset
|
16 } |
a25cd1c6335a
Pass screens through engine by name
Neil Muller <neil@dip.sun.ac.za>
parents:
599
diff
changeset
|
17 START_SCREEN = 'menu' |
553
ebb2efcb4ea7
Create a re-usable main function.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
18 |
ebb2efcb4ea7
Create a re-usable main function.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
19 |
ebb2efcb4ea7
Create a re-usable main function.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
20 def main(): |
554
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
21 ss = SuspendedSentence() |
99a1420097df
Create GameDescription object.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
553
diff
changeset
|
22 return ss.main() |