public static GumballMachine CreateGumballMachine(int numberGumballs)
 {
     if (gumballMachine == null)
     {
         gumballMachine = new GumballMachine(numberGumballs);
     }
     return gumballMachine;
 }
 public WinnerSoldState(GumballMachine _gumballMachine)
     : base(_gumballMachine)
 {
 }
Exemple #3
0
 protected SuperState(GumballMachine _gumballMachine)
 {
     gumballMachine = _gumballMachine;
 }
 public SoldOutState(GumballMachine _gumballMachine)
     : base(_gumballMachine)
 {
 }
 public NoQuarterState(GumballMachine _gumballMachine)
     : base(_gumballMachine)
 {
 }