diff options
-rwxr-xr-x | cameltris.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cameltris.py b/cameltris.py index dc83ea8..ca4ffed 100755 --- a/cameltris.py +++ b/cameltris.py @@ -299,9 +299,11 @@ next_piece, next_piece_position = generate_piece() refresh_piece_preview_canvas() # Number of frames -frames_per_gridcell = 3 +frames_per_gridcell = [48, 43, 38, 33, 28, 23, 18, 13, 8, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1] piece_drop_frames = 0 +level = 16 + pygame.key.set_repeat(200, 50) clock = pygame.time.Clock() @@ -333,7 +335,7 @@ while True: except WouldCollide: stick_piece() - if piece_drop_frames >= frames_per_gridcell: + if piece_drop_frames >= frames_per_gridcell[level - 1]: piece_drop_frames = 0 try: move_piece_down() |