state pattern example: gumball machine