Skip to content

Commit

Permalink
improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
K0626089 committed Jun 9, 2017
1 parent a225e82 commit 2ef5f6f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pytris.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,18 @@ def is_stackable(mino):
for event in pygame.event.get():
if event.type == QUIT:
done = True
elif event.type == USEREVENT:
draw_board(next_mino, hold_mino, score, level, goal)

pause_text = ui_variables.h2.render("PAUSED", 1, ui_variables.white)
screen.blit(pause_text, (47, 100))

pygame.display.update()
elif event.type == KEYDOWN:
erase_mino(dx, dy, mino, rotation)
if event.key == K_ESCAPE:
pause = False

draw_board(next_mino, hold_mino, score, level, goal)

pause_text = ui_variables.h2.render("PAUSED", 1, ui_variables.white)
screen.blit(pause_text, (47, 100))

pygame.display.update()

# Game screen
elif start:
for event in pygame.event.get():
Expand Down

0 comments on commit 2ef5f6f

Please sign in to comment.