diff options
author | rcoh <rcoh@mit.edu> | 2011-08-29 01:46:55 -0400 |
---|---|---|
committer | rcoh <rcoh@mit.edu> | 2011-08-29 01:46:55 -0400 |
commit | 507ca19df23b4e22fc0261bcc6c1275cd2ceef47 (patch) | |
tree | b75411dffe19d181be9ce91a48ab39593a6fcbb7 /tetris.py | |
parent | 37af70803573d93fd2793d5333fc23a9d8f1e4c2 (diff) |
some style changes in tetris.
Diffstat (limited to 'tetris.py')
-rw-r--r-- | tetris.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |