internal Player ResolveRound() { BattleResult <CARD_VALUE> battleResult = GameWar.Battle(currentRound.Values.First(), currentRound.Values.Last()); if (!battleResult.IsEquality) { if (currentRound.Values.First() == battleResult.CardValue) { return(currentRound.Keys.First()); } return(currentRound.Keys.Last()); } return(null); }
public void Should_ten_equal_versus_ten() { var result = GameWar.Battle(CARD_VALUE.TEN, CARD_VALUE.TEN); Assert.IsTrue(result.IsEquality); }
public void Should_ten_lose_versus_king() { BattleResult <CARD_VALUE> winner = GameWar.Battle(CARD_VALUE.TEN, CARD_VALUE.KING); Assert.AreEqual(CARD_VALUE.KING, winner.CardValue); }
public void Should_king_card_win_versus_queen() { BattleResult <CARD_VALUE> winner = GameWar.Battle(CARD_VALUE.KING, CARD_VALUE.QUEEN); Assert.AreEqual(CARD_VALUE.KING, winner.CardValue); }