Beispiel #1
0
    def test(self):
        direction = Direction(1, -1, -1, 1)

        position = (3, 5, 2, 1)
        actual = direction.get_previous_step_positions(position)
        expected = [(2, 5, 2, 1), (3, 6, 2, 1), (3, 5, 3, 1), (3, 5, 2, 0)]
        self.assertEqual(expected, actual)
Beispiel #2
0
 def test_going_right_to_left(self):
     direction = Direction(-1)
     position = (3,)
     self.assertEqual([(4,)], direction.get_previous_step_positions(position))