diff --git a/src/game/game.py b/src/game/game.py index dae57ce..25b70a9 100644 --- a/src/game/game.py +++ b/src/game/game.py @@ -8,6 +8,4 @@ class Game: self.dispaly_surface = pygame.display.get_surface() def run(self) -> None: - self.dispaly_surface.blit( - self.surface, (CONFIG.window.padding, CONFIG.window.padding) - ) + self.dispaly_surface.blit(self.surface, CONFIG.game.pos) diff --git a/src/game/score.py b/src/game/score.py new file mode 100644 index 0000000..3f92c9b --- /dev/null +++ b/src/game/score.py @@ -0,0 +1,14 @@ +import pygame +from utils import CONFIG, Size + + +class Score: + def __init__(self) -> None: + self.surface = pygame.Surface(CONFIG.sidebar.score) + self.rect = self.surface.get_rect( + bottomright=CONFIG.window.size.sub(CONFIG.window.padding) + ) + self.dispaly_surface = pygame.display.get_surface() + + def run(self) -> None: + self.dispaly_surface.blit(self.surface, self.rect)