Beispiel #1
0
        public void TurnCrank()
        {
            Console.WriteLine("You turned...");
            var winner = _randomWinner.Next(10);

            if (winner == 0 && _machine.GetCount() > 1)
            {
                _machine.SetState(_machine.GetWinnerState());
            }
            else
            {
                _machine.SetState(_machine.GetSoldState());
            }
        }
        public void TurnCrank()
        {
            Console.WriteLine("You turned the crank ...");
            int winner = _randomNumber.Next(10);

            if ((winner == 1) && (_gumballMachine.GetCount() > 1))
            {
                _gumballMachine.SetState(_gumballMachine.GetWinnerState());
            }
            else
            {
                _gumballMachine.SetState(_gumballMachine.GetSoldState());
            }
        }
        public void TurnCrank()
        {
            Console.WriteLine("You turned");

            int winner = randomWinner.Next(10);

            if (winner == 0 && gumballMachine.GetCount() > 1)
            {
                gumballMachine.SetState(gumballMachine.GetWinnerState());
            }
            else
            {
                gumballMachine.SetState(gumballMachine.GetSoldState());
            }
        }
        public override void TurnCrank()
        {
            Console.WriteLine("You turned...");

            int winner = randomWinner.Next(10);

            if (winner == 0 && GumballMachine.GetCount() > 1)
            {
                GumballMachine.SetState(GumballMachine.GetWinnerState());
            }
            else
            {
                GumballMachine.SetState(GumballMachine.GetSoldState());
            }

            GumballMachine.SetState(GumballMachine.GetSoldState());
        }
 public void TurnCrank()
 {
     view.DisplayMessage("You turned...");
     gumballMachine.SetState(gumballMachine.GetSoldState());
 }
 public void TrunCrank()
 {
     Debug.Log("You turned...");
     gumballMachine.SetState(gumballMachine.GetSoldState());
 }