Exemple #1
0
    def test_boat_moves(self):
        # given
        map_input = [[" ", "B"], [" ", " "]]
        # when
        get_next_state_map(map_input, [])

        # then
        expect = [[" ", " "], [" ", "B"]]

        self.assertEqual(expect, map_input)
Exemple #2
0
    def test_rock_stops_boat(self):
        # given
        map_input = [[" ", "B"], [" ", "R"]]
        # when
        get_next_state_map(map_input, [])

        # then
        expect = [[" ", "B"], [" ", "R"]]

        self.assertEqual(expect, map_input)
Exemple #3
0
    def test_boats_move_in_order_left(self):
        # given
        map_input = [['B', 'B', 'B', ' '], [' ', ' ', 'B', 'B']]

        # when
        get_next_state_map(map_input, [])

        # then
        expect = [[' ', ' ', 'B', ' '], ['B', 'B', 'B', 'B']]

        self.assertEqual(expect, map_input)