feat: create sheet splice part of text generator
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import sys
|
||||
from typing import Text
|
||||
import pygame
|
||||
from pygame import mixer
|
||||
from tetris.util import ConfigurationManager
|
||||
from tetris.util import TextGenerator
|
||||
from tetris.entity import PieceGenerator
|
||||
from tetris.entity import Well
|
||||
from tetris.entity import Stack
|
||||
@@ -21,6 +23,7 @@ class Game:
|
||||
|
||||
def initialize(self) -> None:
|
||||
pygame.init()
|
||||
TextGenerator.load("resource/font/retro-font.bmp", (20, 30))
|
||||
|
||||
win_width = ConfigurationManager.get("window", "width")
|
||||
win_height = ConfigurationManager.get("window", "height")
|
||||
@@ -119,9 +122,8 @@ class Game:
|
||||
if self.current_piece:
|
||||
self.current_piece.draw(self.screen)
|
||||
|
||||
self.sheet = pygame.image.load("resource/font/gravity-font.bmp").convert()
|
||||
self.screen.blit(self.sheet, (0, 0), pygame.Rect(30, 30, 30, 30))
|
||||
|
||||
TextGenerator.draw("SCORE", (0, 0), self.screen)
|
||||
|
||||
# update display
|
||||
pygame.display.update()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user