import pygame from titlescreen import title_screen from lobby import level_selector from levels import level from endscreen import end_screen # Initialize Pygame pygame.init() # Set up screen dimensions screen_width = 800 screen_height = 800 screen = pygame.display.set_mode((screen_width, screen_height)) pygame.display.set_caption("Tauranga Boys' College THE GAME") def main_game(): level_end = 1 scene_name = "title_screen" while scene_name != "quit": # Scene if scene_name == "title_screen": scene_name = title_screen(screen_height, screen_width, screen) if scene_name == "level_selector": scene_name = level_selector(screen_height, screen_width, screen, level_end) if scene_name == "level_1": scene_name, level_unlocked = level(screen, level_end, 1) level_end = max(level_unlocked, level_end) if scene_name == "level_2": scene_name, level_unlocked = level(screen, level_end, 2) level_end = max(level_unlocked, level_end) if scene_name == "level_3": scene_name, level_unlocked = level(screen, level_end, 3) level_end = max(level_unlocked, level_end) if scene_name == "level_4": level_end -= 3 scene_name = end_screen(screen_height, screen_width, screen) # Start the game main_game()