From 507ca19df23b4e22fc0261bcc6c1275cd2ceef47 Mon Sep 17 00:00:00 2001 From: rcoh Date: Mon, 29 Aug 2011 01:46:55 -0400 Subject: some style changes in tetris. --- tetris.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tetris.py') diff --git a/tetris.py b/tetris.py index 7851718..5a0b1d6 100644 --- a/tetris.py +++ b/tetris.py @@ -25,7 +25,7 @@ LEVEL_SPEEDS = [800,700,600,500,400,300,200,150,100,70] MAXX = 10 MAXY = 18 -(LEFT, RIGHT, UP, DOWN) = range(4) +(LEFT, RIGHT, UP, DOWN, DROP, DIE) = range(6) COLORS = ["orange", "red", "green", "blue", "purple", "yellow", "magenta"] LEVEL_COLORS = ["red", "orange red", "orange", "yellow", @@ -263,14 +263,14 @@ class TetrisGame(object): if ev: player,direction = ev #print "Player",player,direction - if direction == "DIE": #Exit instruction + if direction == DIE: #Exit instruction game_on = False pygame.quit() sys.exit() if self.gameState.state=="playing": if self.players[player]!=None: #DROP is only for debugging purposes for now, to make the game end. - if direction == "DROP": + if direction == DROP: while self.players[player].handle_move( DOWN ): pass else: -- cgit v1.2.3