|
nsnake
Classic snake game for the terminal
|

Public Member Functions | |
| void | start (std::string levelName="") |
| Starts game, optionally loading a level. | |
| void | handleInput () |
| void | update () |
| void | draw () |
| bool | isOver () |
| bool | willQuit () |
| If we'll quit the game right away. | |
| bool | willReturnToMenu () |
| If we'll return to the main menu. | |
| int | getDelay (int speed) |
| Returns how much time (millisseconds) we need to wait for a specific #speed. | |
| void | pause (bool option) |
Public Attributes | |
| ScoreFile * | scores |
| All the current level's score. | |
| ScoreEntry * | currentScore |
| Current score for this level. | |
Protected Attributes | |
| LayoutGame * | layout |
| bool | gameOver |
| If the game is over (board is full of blocks). | |
| bool | userAskedToQuit |
| bool | userAskedToGoToMenu |
| Timer | timerSnake |
| Timer that tells when to move the player, based on the current speed). | |
| Timer | timerBoard |
| Timer that tells when to scroll the board, if this game setting is activated. | |
| Timer | timer |
| bool | isPaused |
| If the game is paused. | |
| bool | showPauseMenu |
| If it's showing the pause menu. | |
| bool | showHelp |
| If it's showing the help screen. | |
| Menu * | pauseMenu |
| Menu that's shown only when the user presses Pause. | |
| Player * | player |
| Board * | board |
| FruitManager * | fruits |
Friends | |
| class | LayoutGame |
| int Game::getDelay | ( | int | speed | ) |
| void Game::start | ( | std::string | levelName = "" | ) |
Starts game, optionally loading a level.
| bool Game::willReturnToMenu | ( | ) |
|
friend |
| ScoreEntry* Game::currentScore |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| ScoreFile* Game::scores |
|
protected |
|
protected |
|
protected |
|
protected |