mirror of
https://github.com/kristoferssolo/2048.git
synced 2026-03-22 00:26:26 +00:00
feat(game): add is_game_over method
This commit is contained in:
@@ -79,3 +79,6 @@ class Board(pygame.sprite.Group):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def is_game_over(self) -> bool:
|
||||||
|
"""Check if the game is over."""
|
||||||
|
return self._is_full() and not self._can_move()
|
||||||
|
|||||||
Reference in New Issue
Block a user