diff --git a/src/game/game.py b/src/game/game.py index 537785e..19a3f60 100644 --- a/src/game/game.py +++ b/src/game/game.py @@ -11,14 +11,14 @@ from .timer import Timer, Timers class Game: - def __init__(self, get_next_shape: Callable[[], Figure]) -> None: + def __init__(self, get_next_figure: Callable[[], Figure]) -> None: self.surface = pygame.Surface(CONFIG.game.size) self.dispaly_surface = pygame.display.get_surface() self.rect = self.surface.get_rect(topleft=CONFIG.game.pos) self.sprites: pygame.sprite.Group[Block] = pygame.sprite.Group() - self.get_next_shape = get_next_shape + self.get_next_shape = get_next_figure self._create_grid_surface() diff --git a/src/game/main.py b/src/game/main.py index a21bf40..328737a 100644 --- a/src/game/main.py +++ b/src/game/main.py @@ -18,9 +18,9 @@ class Main: self.display_surface.fill(CONFIG.colors.bg) self.clock = pygame.time.Clock() - self.next_shapes = self._generate_next_shapes() + self.next_figures = self._generate_next_figures() - self.game = Game(self._get_next_shape) + self.game = Game(self._get_next_figure) self.score = Score() self.preview = Preview() @@ -51,10 +51,10 @@ class Main: pygame.quit() sys.exit() - def _generate_next_shapes(self, amount: int = 3) -> list[Figure]: + def _generate_next_figures(self, amount: int = 3) -> list[Figure]: return [Figure.random() for _ in range(amount)] - def _get_next_shape(self) -> Figure: - next_shape = self.next_shapes.pop(0) - self.next_shapes.append(Figure.random()) + def _get_next_figure(self) -> Figure: + next_shape = self.next_figures.pop(0) + self.next_figures.append(Figure.random()) return next_shape