mirror of
https://github.com/kristoferssolo/2048.git
synced 2025-10-21 15:20:35 +00:00
feat(game): add is_game_over method
This commit is contained in:
parent
89b5d77ee8
commit
de7afa3df1
@ -79,3 +79,6 @@ class Board(pygame.sprite.Group):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_game_over(self) -> bool:
|
||||
"""Check if the game is over."""
|
||||
return self._is_full() and not self._can_move()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user