UPDATE: Window resizable

This commit is contained in:
2025-03-16 17:15:27 +01:00
parent a38b2de19b
commit 9cd205a293
3 changed files with 6 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ FPS = 60
class Game:
def __init__(self, match: Match):
pygame.init()
self.screen = pygame.display.set_mode((WIDTH, HEIGHT))
self.screen = pygame.display.set_mode((WIDTH, HEIGHT), pygame.RESIZABLE)
self.font = pygame.font.Font(None, 36)
self.small_font = pygame.font.Font(None, 15)

View File

@@ -37,6 +37,7 @@ class Renderer:
self.top_left_x, self.bottom_right_x, self.top_left_y, self.bottom_right_y)
def render_players(self):
"""Draws everything on screen."""
self.map_coord_controller.update_screen_size(self.screen.get_width(), self.screen.get_height())
for player in self.match.get_players():
if player.dead:
continue