import pygame
import time
import random
width,height = 1000, 700
win = pygame.display.set_mode((width, height))
pygame.display.set_caption(‘spacedodge’)
player_width = 40
player_height = 60
def draw(player):
win.blit(bg, (0,0))
pygame.draw.Rect(win, 'red', player)
pygame.display.update()
def main():
run = True
player = pygame.Rect(200, height - player_height, player_width, player_height)
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
break
draw(player)
pygame.quit()
if name == ‘main’:
main()