47 lines
1006 B
D
47 lines
1006 B
D
module app;
|
|
|
|
import gumballmachine;
|
|
import std.stdio : writeln;
|
|
|
|
void main()
|
|
{
|
|
GumballMachine gumballMachine = new GumballMachine(10);
|
|
|
|
writeln(gumballMachine);
|
|
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
|
|
writeln(gumballMachine);
|
|
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
|
|
writeln(gumballMachine);
|
|
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
|
|
writeln(gumballMachine);
|
|
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
|
|
writeln(gumballMachine);
|
|
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
gumballMachine.insertQuarter();
|
|
gumballMachine.turnCrank();
|
|
|
|
writeln(gumballMachine);
|
|
}
|