We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01ab462 commit 1b2aba1Copy full SHA for 1b2aba1
game.py
@@ -13,8 +13,10 @@
13
pygame.init()
14
pygame.mixer.init() # For sound
15
16
-# Screen dimensions
17
-WIDTH, HEIGHT = 800, 600
+# Get screen dimensions
+info = pygame.display.Info()
18
+WIDTH, HEIGHT = info.current_w, info.current_h
19
+
20
screen = pygame.display.set_mode((WIDTH, HEIGHT))
21
pygame.display.set_caption("EEG Tug of War Game")
22
@@ -53,7 +55,7 @@
53
55
title_text = "EEG Tug of War Game"
54
56
57
title_surface = font.render(title_text, True, WHITE)
-title_rect = title_surface.get_rect(center=(800 // 2, font_size)) # Center at the top middle
58
+title_rect = title_surface.get_rect(center=(WIDTH // 2, font_size)) # Center at the top middle
59
60
clock = pygame.time.Clock()
61
0 commit comments