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