initial commit
This commit is contained in:
commit
39f56a3b10
83 files changed
+3583
No files matched your search
@@ -0,0 +1,33 @@
|
||||
|
||||
import pygame
|
||||
|
||||
|
||||
def init_game():
|
||||
pygame.init()
|
||||
screen = pygame.display.set_mode()
|
||||
pygame.display.set_caption("Innit Game")
|
||||
return screen
|
||||
|
||||
def game_loop(screen):
|
||||
while True:
|
||||
if not event_handling():
|
||||
break
|
||||
if not update_game():
|
||||
break
|
||||
draw_game(screen)
|
||||
|
||||
def exit_game():
|
||||
pygame.quit()
|
||||
|
||||
def event_handling():
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
return False
|
||||
return True
|
||||
|
||||
def update_game():
|
||||
return True
|
||||
|
||||
def draw_game(screen):
|
||||
screen.fill("BLACK")
|
||||
pygame.display.flip()
|
||||
Reference in new issue
Block a user