Projekt_AI-Automatyczny_saper/Engine/Agent.py
2021-03-30 21:01:54 +02:00

30 lines
784 B
Python

import pygame
from Constants import ROWS, COLS, UP, LEFT, DOWN, RIGHT
class Agent(object):
def __init__(self, point):
self.point = point
self.image = pygame.image.load('Engine/agent.png')
def getPoint(self):
return self.point
def defuse(self, bomb):
bomb.isDefused = True
# 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