NAME
SDL::Tutorial::Tetris::Controller::CPUSpinner
DESCRIPTION
The CPUSpinner
controller is the heartbeat of the game.
The game proceeds while keep_going
is set. When CPUSpinner
receives a Quit
event, keep_going
is set to zero.
init
init
simply initializes keep_going
, so the game will start.
run
Produces a Tick
event while keep_going
is set.
notify
If this controller receives a Quit
event, keep_going
is set to zero, stopping the game.