#include <MazeController.h>
Inherits GameController.

Public Member Functions | |
| MazeController (int level) | |
| virtual | ~MazeController () |
| void | step () |
| This function will be called each time unit of the game. | |
| void | draw (BITMAP *bmp) |
| This function will also be called each screen refresh to draw to the buffer. | |
| bool | isComplete () |
| Will return true if the maze is completed successfully. | |
| void | setRunFailed () |
| This is called to exit the MazeController and go back to the menu. | |
| Graphic * | getDirections () |
| This returns the proper directions for the controller. | |
Static Public Member Functions | |
| static void | defineNames () |
Private Member Functions | |
| MazeProgrammingController * | generateProgrammingController (int level, bool retry) |
| void | setRunController () |
| Create a MazeRunController from the current Command Sequence and set it as the subcontroller. | |
| void | setProgrammingController () |
| Create a MazeRunController and set it as the subcontroller. | |
| RobotMaze * | generateMaze (int level) |
| void | setupButtonSpots () |
| list< MazeCommand > * | getCommandSequence () |
| Return a list of the commands, substituting the subroutine for subroutine commands. | |
| list< MazeCommand > * | getSubroutineSequence () |
| Get the list of commands in the subroutine. | |
Private Attributes | |
| list< ButtonSpot * > * | CommandSpots |
| These are the lists keeping track of what are in the instructions and subroutine instructions areas. | |
| list< ButtonSpot * > * | SubroutineSpots |
| GameController * | controller |
| This is the current controller underneath, either a MazeProgrammingController or MazeRunController. | |
| RobotMaze * | Maze |
| This is the maze information for this level. | |
| bool | complete |
| This will be set to true when this level is completed successfully. | |
| bool | runFailed |
| bool | programmingMode |
| int | Level |
| int | endCount |
| MazeController::MazeController | ( | int | level | ) |
| MazeController::~MazeController | ( | ) | [virtual] |
| void MazeController::defineNames | ( | ) | [static] |
| void MazeController::draw | ( | BITMAP * | ) | [virtual] |
This function will also be called each screen refresh to draw to the buffer.
Implements GameController.
| RobotMaze * MazeController::generateMaze | ( | int | level | ) | [private] |
Gets the correct RobotMaze depending on the level, this function stores the actual data on what the different mazes look like
| MazeProgrammingController * MazeController::generateProgrammingController | ( | int | level, | |
| bool | retry | |||
| ) | [private] |
This fetches the correct MazeProgrammingController, which will have different commands available depending on which level the player is on
| list< MazeCommand > * MazeController::getCommandSequence | ( | ) | [private] |
Return a list of the commands, substituting the subroutine for subroutine commands.
| Graphic* MazeController::getDirections | ( | ) | [inline, virtual] |
| list< MazeCommand > * MazeController::getSubroutineSequence | ( | ) | [private] |
Get the list of commands in the subroutine.
| bool MazeController::isComplete | ( | ) | [inline, virtual] |
| void MazeController::setProgrammingController | ( | ) | [private] |
Create a MazeRunController and set it as the subcontroller.
| void MazeController::setRunController | ( | ) | [private] |
Create a MazeRunController from the current Command Sequence and set it as the subcontroller.
| void MazeController::setRunFailed | ( | ) |
This is called to exit the MazeController and go back to the menu.
| void MazeController::setupButtonSpots | ( | ) | [private] |
This function creates the CommandSpots and SubroutineSpots, calculating their locations and constructing them.
| void MazeController::step | ( | ) | [virtual] |
list<ButtonSpot*>* MazeController::CommandSpots [private] |
These are the lists keeping track of what are in the instructions and subroutine instructions areas.
bool MazeController::complete [private] |
This will be set to true when this level is completed successfully.
GameController* MazeController::controller [private] |
This is the current controller underneath, either a MazeProgrammingController or MazeRunController.
int MazeController::endCount [private] |
The game will wait this many steps after the MazeRunController successfully completes to show the player the win frame
int MazeController::Level [private] |
This is the level for the current game
RobotMaze* MazeController::Maze [private] |
This is the maze information for this level.
bool MazeController::programmingMode [private] |
This is true if the current controller is a MazeProgrammingController
bool MazeController::runFailed [private] |
This will be set to true if the run failed in the MazeRunController, and will be used to switch back to the MazeProgrammingController
list<ButtonSpot*> * MazeController::SubroutineSpots [private] |
1.5.7.1