feat: create main loop and game window

This commit is contained in:
Giovani Rodriguez
2021-06-02 03:15:40 -04:00
parent e793bd6aa1
commit 0b432a788b
2 changed files with 20 additions and 0 deletions

20
main.py Normal file
View File

@@ -0,0 +1,20 @@
import pygame
def main():
pygame.init()
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption("Tetris")
icon = pygame.image.load("img/tetris_icon.png")
pygame.display.set_icon(icon)
is_running = True
while is_running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
is_running = False
screen.fill((100, 149, 237))
pygame.display.update()
main()