Example #1
0
def test_play_two_of_three():
    game = War(human=False)
    #There should be a dictionary that tracks win counts.
    n.assert_equal(max(game.win_counts.values()), 0)
    game.play_two_of_three()
    n.assert_equal(max(game.win_counts.values()), 2)
    #Make sure you don't get too many cards!
    n.assert_equal(len(game.player1) + len(game.player2) + len(game.pot), 52)
Example #2
0
def test_play_two_of_three():
    game = War(human=False)
    #There should be a dictionary that tracks win counts.
    n.assert_equal(max(game.win_counts.values()), 0)
    game.play_two_of_three()
    n.assert_equal(max(game.win_counts.values()), 2)
    #Make sure you don't get too many cards!
    n.assert_equal(len(game.player1) + len(game.player2) + len(game.pot), 52)