Exemple #1
0
        public void ShouldPlayCardAtRandomFromHandWhenUsingRandomStrategy()
        {
            var player = new EpsilonGreedyAgent(1);
            var state  = TestUtilities.GenerateTestState(2, 1);

            var play = player.FormulatePlay(state);

            CollectionAssert.Contains(CardTypeExtensions.OneCardOfEachColor, play.Card);
            Assert.AreEqual(0, play.Position);
        }
Exemple #2
0
        public void ShouldPlayCardOnOnlyOwlThatGoesFurthestWhenUsingGreedyStrategy()
        {
            var player       = new EpsilonGreedyAgent(0);
            var greedyPlayer = new GreedyAgent();

            var state = TestUtilities.GenerateTestState(2, 1);

            var play       = player.FormulatePlay(state);
            var greedyPlay = greedyPlayer.FormulatePlay(state);

            Assert.AreEqual(play.Card, greedyPlay.Card);
            Assert.AreEqual(play.Position, greedyPlay.Position);
        }