static void Main(string[] args) { GumballMachine gumballMachine = new GumballMachine(5); Console.WriteLine(gumballMachine); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); Console.WriteLine(gumballMachine); gumballMachine.InsertQuarter(); gumballMachine.EjectQuarter(); gumballMachine.TurnCrank(); Console.WriteLine(gumballMachine); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); gumballMachine.EjectQuarter(); Console.WriteLine(gumballMachine); gumballMachine.InsertQuarter(); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); gumballMachine.InsertQuarter(); gumballMachine.TurnCrank(); Console.WriteLine(gumballMachine); }
public NoQuarterState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; }
public SoldState(GumballMachine gumballMachine) { // TODO: Complete member initialization this.gumballMachine = gumballMachine; }
public WinnerState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; }
public SoldState(GumballMachine gumballMachine) { this.gumballMachine = gumballMachine; }