Projekt_AI-Automatyczny_saper/Engine/Game.py
2021-03-15 19:58:20 +01:00

29 lines
594 B
Python

import pygame
from Constants import SQUARE_SIZE, GREEN, RIGHT, LEFT, UP, DOWN
from Board import Board
import Agent
class Game:
def __init__(self, win):
self._init()
self.win = win
def _init(self):
self.board = Board()
self.agent = Agent(0, 0)
self.turn = GREEN
def update(self):
self.board.drawSquares(self.win)
self.board.drawAgent(self,self.win,self.agent)
pygame.display.update()
def move(self, destination):
if destination == UP and self.agent.ifNotOnEdge(UP):
self.agent.row -= 1