public void ShouldPlayCardOnOnlyOwlThatGoesFurthest() { var player = new GreedyPlayer(); var board = new GameBoard(2, 1); player.Hand.Add(CardTypeExtensions.OneCardOfEachColor); var play = player.FormulatePlay(board); Assert.AreEqual(CardType.Red, play.Card); Assert.AreEqual(0, play.Position); }
public void ShouldPlayCardOnOwlThatGoesFurthestWithHootingIntoNest() { var player = new GreedyPlayer(); var board = new GameBoard(2); board.Owls.Move(0, 6); player.Hand.Add(CardTypeExtensions.OneCardOfEachColor); var play = player.FormulatePlay(board); Assert.AreEqual(CardType.Red, play.Card); Assert.AreEqual(1, play.Position); }
public void ShouldPlayCardOnOnlyOwlThatGoesFurthestWhenUsingGreedyStrategy() { var player = new EpsilonGreedyPlayer(0); var greedyPlayer = new GreedyPlayer(); var board = new GameBoard(2, 1); player.Hand.Add(CardTypeExtensions.OneCardOfEachColor); greedyPlayer.Hand.Add(CardTypeExtensions.OneCardOfEachColor); var play = player.FormulatePlay(board); var greedyPlay = player.FormulatePlay(board); Assert.AreEqual(play.Card, greedyPlay.Card); Assert.AreEqual(play.Position, greedyPlay.Position); }