private Game ReduceTo3SticksStartingWithMachine()
        {
            var gen = new PredictableGenerator();

            gen.SetNumber(Game.MaxToTake);

            var sut = new Game(11, Player.Machine, gen);

            sut = sut.MachineMakesMove();             //8
            sut = sut.HumanMakesMove(Game.MinToTake); //7
            sut = sut.MachineMakesMove();             //4
            sut = sut.HumanMakesMove(Game.MinToTake); //3
            return(sut);
        }
        private static Game ReduceTo2SticksStartingWithHuman()
        {
            var gen = new PredictableGenerator();

            gen.SetNumber(Game.MinToTake);

            var sut = new Game(10, Player.Human, gen);

            sut = sut.HumanMakesMove(Game.MaxToTake); //7
            sut = sut.MachineMakesMove();             //6
            sut = sut.HumanMakesMove(Game.MaxToTake); //3
            sut = sut.MachineMakesMove();             //2
            return(sut);
        }
        public void MachineMakesMove_CorrectGameState(int takes, int remains)
        {
            var gen = new PredictableGenerator();

            gen.SetNumber(takes);

            int taken = 0;
            var sut   = new Game(10, Player.Machine, gen);

            sut.MachineMoved += (s, args) => taken = args.Taken;

            sut = sut.MachineMakesMove();

            Assert.That(sut.NumberOfSticks, Is.EqualTo(remains));
            Assert.That(takes, Is.EqualTo(taken));
            Assert.That(sut.Turn, Is.EqualTo(Player.Human));
        }