Ejemplo n.º 1
0
 def test_board_end_move_east(self):
     argument1 = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4],
                  [1, 0], [1, 1], [1, 2], [1, 3], [1, 4],
                  [2, 0], [2, 1], [2, 2], [2, 3], [2, 4],
                  [3, 0], [3, 1], [3, 2], [3, 3], [3, 4],
                  [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]]
     argument2 = 'e'
     argument3 = {'x': 4, 'y': 4}
     actual = move_character(argument1, argument2, argument3)
     expected = {'x': 4, 'y': 4}
     self.assertEqual(expected, actual)
Ejemplo n.º 2
0
 def test_board_beginning_move_east_full(self):
     argument1 = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4],
                  [1, 0], [1, 1], [1, 2], [1, 3], [1, 4],
                  [2, 0], [2, 1], [2, 2], [2, 3], [2, 4],
                  [3, 0], [3, 1], [3, 2], [3, 3], [3, 4],
                  [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]]
     argument2 = 'east'
     argument3 = {'x': 0, 'y': 0}
     actual = move_character(argument1, argument2, argument3)
     expected = {'x': 0, 'y': 1}
     self.assertEqual(expected, actual)
Ejemplo n.º 3
0
 def test_board_middle_move_south(self):
     argument1 = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4],
                  [1, 0], [1, 1], [1, 2], [1, 3], [1, 4],
                  [2, 0], [2, 1], [2, 2], [2, 3], [2, 4],
                  [3, 0], [3, 1], [3, 2], [3, 3], [3, 4],
                  [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]]
     argument2 = 's'
     argument3 = {'x': 2, 'y': 2}
     actual = move_character(argument1, argument2, argument3)
     expected = {'x': 3, 'y': 2}
     self.assertEqual(expected, actual)