Projekt_AI-Automatyczny_saper/Engine/Agent.py

24 lines
722 B
Python
Raw Normal View History

2021-03-16 18:53:26 +01:00
import pygame
2021-03-15 19:04:51 +01:00
from Constants import ROWS, COLS, UP, LEFT, DOWN, RIGHT
class Agent(object):
2021-03-27 22:07:55 +01:00
def __init__(self, point):
self.point = point
2021-03-16 18:53:26 +01:00
self.image = pygame.image.load('Engine/agent.png')
2021-03-15 19:04:51 +01:00
2021-03-27 22:07:55 +01:00
def getPoint(self):
return self.point
2021-03-16 18:53:26 +01:00
# def ifNotOnEdge(self, destination):
# if destination == UP:
# if self.x - 1 <= 0:
# return False
# if destination == DOWN:
# if self.x + 1 > ROWS:
# return False
# if destination == LEFT:
# if self.y - 1 <= 0:
# return False
# if destination == RIGHT:
# if self.y + 1 > COLS:
# return False
# return True