Mercurial > atc
changeset 57:35999e551d7a server tip
Call state's update method 2 times per second
author | Josef "Jeff" Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 03 Jun 2007 01:25:28 -0400 |
parents | a793c2b15c71 |
children | |
files | atcgame/server.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/atcgame/server.py Sun Jun 03 01:18:28 2007 -0400 +++ b/atcgame/server.py Sun Jun 03 01:25:28 2007 -0400 @@ -38,6 +38,7 @@ def server_helper(): while not ShutDown: server.handle_request() + ## ShutDown = False @@ -56,8 +57,8 @@ try: while True: - print "X" - time.sleep(5) + time.sleep(0.5) + state.update() pass except KeyboardInterrupt: print "Shutting down..." @@ -72,7 +73,7 @@ # List of all planes in the world self.planes = [] - def __run(self): + def update(self): for p in self.planes: p.update()