Skip to content

Commit

Permalink
Week 2 - 5: (last checkpoint) support replay
Browse files Browse the repository at this point in the history
  • Loading branch information
cent5 committed Jun 25, 2022
1 parent 8a7e473 commit c4458e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
break

world.update()
if not world.status.is_running():
# Kiểm tra xem người chơi có chọn nhấn ENTER để replay
pressed = pygame.key.get_pressed()
if pressed[pygame.K_RETURN]:
world = World(screen)

world.render()
pygame.display.flip()
clock.tick(FPS)
Expand Down

0 comments on commit c4458e0

Please # to comment.