feat(game): add Score surface

This commit is contained in:
Kristofers Solo 2024-01-04 00:31:35 +02:00
parent 306e59ce07
commit 9c306df840
2 changed files with 15 additions and 3 deletions

View File

@ -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)

14
src/game/score.py Normal file
View File

@ -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)