Projekt_Sztuczna_Inteligencja/main.py

59 lines
1.2 KiB
Python
Raw Normal View History

# libraries
2021-03-10 14:01:17 +01:00
import pygame
# other files of this project
import project_constants
import event_interpreter
2021-03-10 14:01:17 +01:00
if __name__ == "__main__":
2021-03-10 14:01:17 +01:00
pygame.init()
pygame.display.set_caption(project_constants.V_NAME_OF_WINDOW)
# loading minefields
# TODO : call to a minefield loading function goes here
2021-03-10 14:01:17 +01:00
running = True
while running:
# ================ #
# === GRAPHICS === #
# ================ #
# background grid (fills frame with white, blits grid)
project_constants.SCREEN.fill((255, 255, 255))
project_constants.SCREEN.blit\
(
project_constants.ASSET_BACKGROUND,
(
project_constants.V_SCREEN_PADDING,
project_constants.V_SCREEN_PADDING
)
)
# tiles
# TODO : call to tile blitting function goes here
# mines
# TODO : call to a mine blitting function goes here
pygame.display.update()
# ============== #
# === EVENTS === #
# ============== #
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
else: event_interpreter.interpret( event )