Ejemplo n.º 1
0
    def test_calls_game_state_with_correct_params_when_player_one_takes_a_turn(
            self, game_state_mock):
        mancala = MancalaBoard(6, 4, None, 55)
        mancala.play(1, 3)

        expected_game_board_log = [[[4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4],
                                    [0, 0]],
                                   [[4, 4, 0, 5, 5, 5], [4, 4, 4, 4, 4, 4],
                                    [1, 0]]]
        game_state_mock.assert_called_with(0, 2, expected_game_board_log, True,
                                           False, 55)
Ejemplo n.º 2
0
 def test_appends_the_game_state_three_times_for_three_turns(
         self, game_state_mock):
     mancala = MancalaBoard(6, 4)
     mancala.play(1, 3)
     mancala.play(2, 1)
     mancala.play(1, 5)
     assert mancala.game_state_log == [{
         "game_state": "values"
     }, {
         "game_state": "values"
     }, {
         "game_state": "values"
     }]
Ejemplo n.º 3
0
 def test_appends_the_game_state_to_logs_when_player_one_takes_a_turn(
         self, game_state_mock):
     mancala = MancalaBoard(6, 4)
     mancala.play(1, 3)
     assert mancala.game_state_log == [{"game_state": "values"}]