Game Screen

This commit is contained in:
2025-01-19 22:25:45 +02:00
commit a646ea7e0f
4 changed files with 35 additions and 0 deletions

25
main.py Normal file
View File

@@ -0,0 +1,25 @@
import pygame
from constants import *
def main():
print("Starting asteroids!")
print(f"Screen width: {SCREEN_WIDTH}")
print(f"Screen height: {SCREEN_HEIGHT}")
pygame.init()
screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
return
screen.fill(pygame.Color(0, 0, 0), pygame.Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.flip()
if __name__ == "__main__":
main()