Example #1
0
    def move(self,direction):
        
        if misc.checkMove(direction,self.xPos,self.yPos,self.zPos,self.ship):
            self.ship.entMap[self.zPos][self.yPos][self.xPos] = None
            
            if direction == "RIGHT":
                self.xPos+=1
            elif direction == "LEFT":
                self.xPos-=1
            elif direction == "UP":
                self.yPos-=1
            elif direction == "DOWN":
                self.yPos+=1

            self.ship.entMap[self.zPos][self.yPos][self.xPos] = self
            return True
        
        return False