repl.it
Pygame

Authority

fork
loading
Files
  • main.py
  • nohup.out
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import pygame as pg
from pygame import display
from pygame.time import Clock

pg.init()

screen = display.set_mode((800, 600))
display.set_caption('a bit racey')
fps = Clock()

crashed = False

while not crashed:
    for event in pg.event.get():
        if event.type == pg.QUIT:
            crashed = True
    print(event)
    display.update()
    fps.tick(60)

pg.quit()
quit()
?