Ejemplo n.º 1
0
        public void Play(Sticks sticks)
        {
            int amountToRemove = 3;

            if (sticks.Amount == 3)
            {
                amountToRemove = 2;
            }
            else if (sticks.Amount == 2 || sticks.Amount == 1)
            {
                amountToRemove = 1;
            }
            sticks.RemoveSticks(amountToRemove);
        }
Ejemplo n.º 2
0
 public Game(Factory factory)
 {
     _view     = factory.GetNewView();
     _sticks   = factory.GetNewSticks();
     _AIPlayer = factory.GetNewAIPlayer();
 }
Ejemplo n.º 3
0
 public virtual void PresentNumberOfSticksLeft(Sticks sticks)
 {
     _console.WriteLine($"There are {sticks.Amount} number of sticks left!");
 }