Exemplo 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();
        }
Exemplo n.º 2
0
 public NoQuarter(GumballStateMachine gsm)
 {
     machine = gsm;
 }
Exemplo n.º 3
0
 public Sold(GumballStateMachine gsm)
 {
     machine = gsm;
 }