feat(game): add restart method

This commit is contained in:
Kristofers Solo 2024-01-01 20:24:36 +02:00
parent de7afa3df1
commit 461c27e2d3

View File

@ -82,3 +82,8 @@ class Board(pygame.sprite.Group):
def is_game_over(self) -> bool:
"""Check if the game is over."""
return self._is_full() and not self._can_move()
def restart(self) -> None:
"""Restart the game."""
self.empty()
self.generate_initial_blocks()