Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (24 sloc) 736 Bytes
from Actions import Actions
from DataItem import DataItem
class Action(DataItem):
def __init__(self, actionType):
self.actionType = actionType
def __eq__(self, other):
return self.actionType == other.actionType
def __str__(self):
if self.actionType == Actions.GO_NORTH:
return "N"
elif self.actionType == Actions.GO_EAST:
return "E"
elif self.actionType == Actions.GO_SOUTH:
return "S"
elif self.actionType == Actions.GO_WEST:
return "W"
return "?"
def getType(self):
return self.actionType
def isAction(self):
return True
def isPerception(self):
return False
You can’t perform that action at this time.