drawing player

This commit is contained in:
2025-07-04 20:58:34 +02:00
parent 73309cb310
commit adad70eaa5
5 changed files with 51 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import pygame
import sys
from constants import *
from player import Player
def main():
print("Starting Asteroids!")
@@ -19,12 +20,17 @@ def main():
time = pygame.time.Clock()
dt = 0
player = Player(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
return
pygame.Surface.fill(screen, (0,0,0))
player.draw(screen)
pygame.display.flip() #refresh screen
dt = time.tick(60) / 1000 #conveted to ms