class Robot(object):
    def __init__(self):
        pass

@@ -1,58 +1,985 @@
-class Robot(object):%0A    def __init__(self):%0A        pass
+import math%0A%0A# Create globals for the bearings%0AEAST = 0%0ANORTH = 90%0AWEST = 180%0ASOUTH = 270%0A%0A%0A# Define simpler int-only sine and cosine functions%0Adef sin(deg):%0A    return int(math.sin(math.radians(deg)))%0A%0Adef cos(deg):%0A    return int(math.cos(math.radians(deg)))%0A%0A%0Aclass Robot(object):%0A    def __init__(self, bearing=NORTH, x_pos=0, y_pos=0):%0A        self.bearing = bearing%0A        self._x = x_pos%0A        self._y = y_pos%0A        self._METHODS = %7B%22R%22: self.turn_right,%0A                        %22L%22: self.turn_left,%0A                        %22A%22: self.advance%7D%0A%0A    def turn_right(self):%0A        self.bearing = (self.bearing - 90) %25 360%0A%0A    def turn_left(self):%0A        self.bearing = (self.bearing + 90) %25 360%0A%0A    def advance(self):%0A        self._x += cos(self.bearing)%0A        self._y += sin(self.bearing)%0A%0A    def simulate(self, commands):%0A        for command in commands:%0A            self._METHODS%5Bcommand%5D()%0A%0A    @property%0A    def coordinates(self):%0A        return (self._x, self._y)
 %0A

Add initial solution