diff --git a/src/py2048/screens/game.py b/src/py2048/screens/game.py index bc309e9..313c00c 100644 --- a/src/py2048/screens/game.py +++ b/src/py2048/screens/game.py @@ -31,6 +31,7 @@ class Game: self.move_down() def move(self, direction: Direction) -> None: + """Moved the board in the given direction and updates the score.""" self.board.move(direction) self.header.update(self.board.score) diff --git a/src/py2048/screens/header.py b/src/py2048/screens/header.py index 22c6b42..f4f32f6 100644 --- a/src/py2048/screens/header.py +++ b/src/py2048/screens/header.py @@ -42,9 +42,8 @@ class Header: return pygame.sprite.Group(self.score, highscore) def draw(self, surface: pygame.Surface) -> None: - """Draw the header.""" self.labels.draw(surface) - def update(self, score: int) -> None: - """Update the score.""" - self.score.update_score(score) + def update(self, new_score: int) -> None: + """Updates the score to `new_score`.""" + self.score.update_score(new_score)