Ejemplo n.º 1
class Rover(object):
    """rover class"""
    def __init__(self):
        """default constructor of rover"""
        self.position = Location(0, 0)
        self.direction = Orientation("E")
    def __init__(self, loc, orient):
        """parameterised constructor of rover class"""
        self.position = loc
        self.direction = orient
    def turn(self, side):
        """fuction to handle turn command"""
        points_to = self.direction.get_direction()
    def move(self):
        """function to handle move command"""
        Navigation.move1(self.position, self.direction)
    def return_status(self):
        """function that returns current status of the rover"""
        return [self.position.get_loc(), self.direction.get_direction()]