#include <MazeRunController.h>
Inherits GameController.

Public Member Functions | |
| MazeRunController (MazeController *parentController, RobotMaze *maze, list< MazeCommand > *commandSequence, int level) | |
| virtual | ~MazeRunController () |
| void | step () |
| update model based on one step of time | |
| void | draw (BITMAP *bmp) |
| draw the game | |
| bool | isComplete () |
| This function can be called to check if the GameController is done. | |
Private Member Functions | |
| void | checkSuccess () |
| Checks if the robot is at the end of the maze. | |
| void | failed () |
| This is called if the robot runs into an obstacle or fails to reach the end of the maze. | |
| void | finished () |
| This is called if the robot successfully finishes the maze. | |
| MoveOutcome | checkMove (MazeCommand command) |
| This checks the next move for the robot and returns an outcome. | |
| void | setupCommand (MazeCommand command) |
| This calls checkMove and has the robot set up its animations for the command. | |
Private Attributes | |
| RobotMaze * | Maze |
| AnimatedRobot * | Robot |
| Keeps track of its location, movement, and animations. | |
| list< MazeCommand >::iterator | Command |
| Current command being executed. | |
| list< MazeCommand > * | CommandSequence |
| List of commands to be executed by robot. | |
| MazeController * | ParentController |
| MazeView * | MazeArea |
| Draws the maze, and calls the draw of the robot. | |
| bool | Failure |
| If the outcome of a move isn't successful, this is set to true. | |
| int | Time |
| This keeps track of time to update the animations of the robot at the correct rate. | |
| bool | complete |
| int | Level |
| The level of this map. | |
| MazeRunController::MazeRunController | ( | MazeController * | parentController, | |
| RobotMaze * | maze, | |||
| list< MazeCommand > * | commandSequence, | |||
| int | level | |||
| ) |
| MazeRunController::~MazeRunController | ( | ) | [virtual] |
| MoveOutcome MazeRunController::checkMove | ( | MazeCommand | command | ) | [private] |
This checks the next move for the robot and returns an outcome.
| void MazeRunController::checkSuccess | ( | ) | [private] |
Checks if the robot is at the end of the maze.
| void MazeRunController::draw | ( | BITMAP * | bmp | ) | [virtual] |
| void MazeRunController::failed | ( | ) | [private] |
This is called if the robot runs into an obstacle or fails to reach the end of the maze.
| void MazeRunController::finished | ( | ) | [private] |
This is called if the robot successfully finishes the maze.
| bool MazeRunController::isComplete | ( | ) | [inline, virtual] |
| void MazeRunController::setupCommand | ( | MazeCommand | command | ) | [private] |
This calls checkMove and has the robot set up its animations for the command.
| void MazeRunController::step | ( | ) | [virtual] |
list<MazeCommand>::iterator MazeRunController::Command [private] |
Current command being executed.
list<MazeCommand>* MazeRunController::CommandSequence [private] |
List of commands to be executed by robot.
bool MazeRunController::complete [private] |
bool MazeRunController::Failure [private] |
If the outcome of a move isn't successful, this is set to true.
int MazeRunController::Level [private] |
The level of this map.
RobotMaze* MazeRunController::Maze [private] |
MazeView* MazeRunController::MazeArea [private] |
Draws the maze, and calls the draw of the robot.
AnimatedRobot* MazeRunController::Robot [private] |
Keeps track of its location, movement, and animations.
int MazeRunController::Time [private] |
This keeps track of time to update the animations of the robot at the correct rate.
1.5.7.1