Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            GumballStateMachine machine = new GumballStateMachine(2);

            machine.insertQuarter();
            machine.turnCrank();
            machine.insertQuarter();
            machine.ejectQuarter();
            machine.insertQuarter();
            machine.insertQuarter();
            machine.turnCrank();
            machine.insertQuarter();
            machine.turnCrank();
            machine.refill();
            machine.insertQuarter();
            machine.turnCrank();
            machine.insertQuarter();
            machine.ejectQuarter();
            machine.insertQuarter();
            machine.insertQuarter();
            machine.turnCrank();

            System.Console.ReadLine();
        }
Ejemplo n.º 2
0
 public NoQuarter(GumballStateMachine gsm)
 {
     machine = gsm;
 }
Ejemplo n.º 3
0
 public Sold(GumballStateMachine gsm)
 {
     machine = gsm;
 }