예제 #1
0
 static void Main(string[] args)
 {
     GumballMachine gumballMachine = new GumballMachine(5);
     Console.WriteLine(gumballMachine);
     gumballMachine.InsertQuarter();
     gumballMachine.TurnCrank();
     Console.WriteLine(gumballMachine);
     gumballMachine.InsertQuarter();
     gumballMachine.TurnCrank();
     gumballMachine.InsertQuarter();
     gumballMachine.TurnCrank();
     Console.WriteLine(gumballMachine);
     Console.ReadKey();
 }
 public NoQuarterState(GumballMachine gumballMachine)
 {
     this.gumballMachine = gumballMachine;
 }
예제 #3
0
 public WinnerState(GumballMachine gumballMachine)
 {
     this.gumballMachine = gumballMachine;
 }
예제 #4
0
 public SoldState(GumballMachine gumballMachine)
 {
     this.gumballMachine = gumballMachine;
 }