Projekt_AI-Automatyczny_saper/main.py
Kraton99 c1cdc1489d bfs
2021-04-13 21:27:51 +02:00

33 lines
593 B
Python

import pygame
from Engine.Game import Game
WIN = pygame.display.set_mode((800, 800))
FPS = 60
def main():
run = True
clock = pygame.time.Clock()
game = Game(WIN)
while run:
pygame.init()
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.time.delay(200)
if game.finalState():
break
if len(game.getPath()) == 0:
path = game.findBomb()
game.savePath(path)
game.moveToNext()
game.update()
main()