def main(): pygame.init() display = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) pygame.display.set_caption("TETRIS") block = Block() pace = Pace() score = Score() grid = Grid() level = Level(block, grid, score, pace) clock = Clock() event_queue = Event() game_renderer = GameRenderer(display, level) ui_renderer = UIRenderer(display) name_input = PlayerName(ui_renderer, event_queue) game_loop = GameLoop(level, clock, event_queue, game_renderer, score_repository) high_scores = HighScores(ui_renderer, event_queue, score_repository) main_menu = MainMenu(ui_renderer, event_queue, name_input, game_loop, high_scores) main_menu.start()
def setUp(self): self.level = Level(Block(), Grid(), Score(), Pace()) self.level.block.shape = [[1], [1], [1], [1]]
def setUp(self): self.score = Score()
def setUp(self): self.level = Level(Block(), Grid(), Score(), Pace())