MazeRunController Class Reference
[Maze minigame]

#include <MazeRunController.h>

Inherits GameController.

Collaboration diagram for MazeRunController:

Collaboration graph
[legend]

List of all members.

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

RobotMazeMaze
AnimatedRobotRobot
 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.
MazeControllerParentController
MazeViewMazeArea
 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.


Constructor & Destructor Documentation

MazeRunController::MazeRunController ( MazeController parentController,
RobotMaze maze,
list< MazeCommand > *  commandSequence,
int  level 
)

MazeRunController::~MazeRunController (  )  [virtual]


Member Function Documentation

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]

draw the game

Implements GameController.

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]

This function can be called to check if the GameController is done.

Implements GameController.

void MazeRunController::setupCommand ( MazeCommand  command  )  [private]

This calls checkMove and has the robot set up its animations for the command.

void MazeRunController::step (  )  [virtual]

update model based on one step of time

Implements GameController.


Member Data Documentation

list<MazeCommand>::iterator MazeRunController::Command [private]

Current command being executed.

List of commands to be executed by robot.

If the outcome of a move isn't successful, this is set to true.

int MazeRunController::Level [private]

The level of this map.

Draws the maze, and calls the draw of the robot.

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.


The documentation for this class was generated from the following files:

Generated on Mon Mar 16 14:33:12 2009 for LearningGaming by  doxygen 1.5.7.1