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