コード例 #1
0
ファイル: test_war.py プロジェクト: treujc/Notebook
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)
コード例 #2
0
ファイル: test_war.py プロジェクト: Keita1/Learning
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)