Kartik Thakore > SDL-Tutorial-Tetris-0.04 > SDL::Tutorial::Tetris::Controller::CPUSpinner

Download:
SDL-Tutorial-Tetris-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

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.

SEE ALSO ^

SDL::Tutorial::Tetris::Controller

syntax highlighting: