public void Should_play_game2_until_deck_empty() { var player1 = new List <int> { 9, 2, 6, 3, 1 }; var player2 = new List <int> { 5, 8, 4, 7, 10 }; var _crabCombat = new CrabCombat(player1, player2); _crabCombat.playGame2(); Assert.Equal(10, _crabCombat.Player2.Count); Assert.Empty(_crabCombat.Player1); }
public void Player_1_should_win_if_decks_reoccur() { var player1 = new List <int> { 43, 19 }; var player2 = new List <int> { 2, 29, 14 }; var _crabCombat = new CrabCombat(player1, player2); _crabCombat.playGame2(); Assert.Equal(2, _crabCombat.Player1.Count); Assert.Equal(3, _crabCombat.Player2.Count); }
public void Should_calculate_winners_score_for_game_2() { var player1 = new List <int> { 9, 2, 6, 3, 1 }; var player2 = new List <int> { 5, 8, 4, 7, 10 }; var _crabCombat = new CrabCombat(player1, player2); _crabCombat.playGame2(); var score = _crabCombat.calculateScore(_crabCombat.GameWinner); Assert.Equal(291, score); }