Projekt_AI-Automatyczny_saper/main.py

33 lines
593 B
Python
Raw Normal View History

2021-03-13 21:16:35 +01:00
import pygame
2021-03-15 19:58:20 +01:00
from Engine.Game import Game
2021-03-13 21:16:35 +01:00
WIN = pygame.display.set_mode((800, 800))
FPS = 60
def main():
run = True
clock = pygame.time.Clock()
2021-03-16 18:53:26 +01:00
game = Game(WIN)
2021-03-13 21:16:35 +01:00
while run:
pygame.init()
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
2021-03-16 18:53:26 +01:00
pygame.time.delay(200)
2021-04-13 21:27:51 +02:00
if game.finalState():
break
if len(game.getPath()) == 0:
path = game.findBomb()
game.savePath(path)
game.moveToNext()
2021-03-15 19:58:20 +01:00
game.update()
2021-03-13 21:16:35 +01:00
2021-03-30 21:01:54 +02:00
main()