コード例 #1
0
    def testTurnLeft270Deg(self):
        the_ship = Ship()
        the_ship.perform_action(make_action("L", 270))

        self.assertEqual("S", the_ship.direction)
コード例 #2
0
    def testTurnRight90Deg(self):
        the_ship = Ship()
        the_ship.perform_action({"type": "R", "value": 90})

        self.assertEqual("S", the_ship.direction)
コード例 #3
0
    def testTurnRight180Deg(self):
        the_ship = Ship()
        the_ship.perform_action(make_action("R", 180))

        self.assertEqual("W", the_ship.direction)