RobotBuilding Class Reference
[Robot building minigame]

#include <RobotBuilding.h>

Inherits GameController, and KeyboardListener.

Collaboration diagram for RobotBuilding:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 RobotBuilding (int level, RobotModel *Goal1, RobotModel *Goal2, RobotModel *Goal3)
virtual ~RobotBuilding ()
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.
int determineBox (int row, int col)
void processKeyboardEvent (KeyboardEvent *e)
void updateCommand (int row, int col)
void updateBox (int row, int col)
void createHolders (int lev)
void setupBuilders (int lev)
 Outputs the model that is built.
void outputModel ()
 Compare the model to the goal.
void compareModel ()
void performExecute ()
void updateBelt (bool forwards)
void animate ()
void resetBuilder ()
bool isComplete ()
 This function can be called to check if the GameController is done.

Private Attributes

Layerbuffer
LayerABHolder
LayerPBHolder
LayerPntHolder
LayerMHolder
LayerSHolder
LayerModelHolder
 Graphics layers used.
int numDone
 Number of robots completed correctly so far.
int curValue
int gameLevel
RobotBuilderbuilder
 The robot building machine.
RobotCommandsetCmd
RobotCommandpaintCmd
RobotCommandloopCmd
RobotCommandunloopCmd
RobotCommandheadCmd
RobotCommandbodyCmd
RobotCommandarmCmd
RobotCommandantCmd
RobotCommandredCmd
RobotCommandblueCmd
RobotCommandgreenCmd
RobotCommandyellowCmd
RobotCommandtriangleCmd
RobotCommandcircleCmd
RobotCommandrectangleCmd
RobotCommandcurrent
RobotCommandmetalCmd
ButtonExecuteButton
 The execute buttom. It builds the robot when clicked.
DraggableSetButton
DraggablePaintButton
DraggableLoopButton
DraggableUnLoopButton
DraggableHeadButton
DraggableBodyButton
DraggableArmButton
DraggableAntennaButton
DraggableRedButton
DraggableBlueButton
DraggableGreenButton
DraggableYellowButton
DraggableTriangleButton
DraggableCircleButton
DraggableRectangleButton
DraggableMetalButton
 The buttons with the various commands that the used can click on.
RobotModelmodel
 The model of the robot being build.
RobotModelgoal1
RobotModelgoal2
RobotModelgoal3
RobotModelgoal
 The various goal robots.
ChangeableSpritebelt
ChangeableSpritetube
WaveSoundbeepSound
WaveSoundclickSound
WaveSoundwhooshSound
int stepNum
bool complete
bool congrats
bool isMoving
bool noerror


Detailed Description

This is the class which does the bulk of the work. It is a GameController which holds all the buttons and layers that are seen in the game.

Constructor & Destructor Documentation

RobotBuilding::RobotBuilding ( int  level,
RobotModel Goal1,
RobotModel Goal2,
RobotModel Goal3 
)

RobotBuilding::~RobotBuilding (  ) 


Member Function Documentation

void RobotBuilding::animate (  ) 

void RobotBuilding::compareModel (  ) 

void RobotBuilding::createHolders ( int  lev  ) 

int RobotBuilding::determineBox ( int  row,
int  col 
)

void RobotBuilding::draw ( BITMAP *   )  [virtual]

This function will also be called each screen refresh to draw to the buffer.

Implements GameController.

bool RobotBuilding::isComplete (  )  [virtual]

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

Implements GameController.

void RobotBuilding::outputModel (  ) 

Compare the model to the goal.

void RobotBuilding::performExecute (  ) 

void RobotBuilding::processKeyboardEvent ( KeyboardEvent e  )  [virtual]

Implements KeyboardListener.

void RobotBuilding::resetBuilder (  ) 

void RobotBuilding::setupBuilders ( int  lev  ) 

Outputs the model that is built.

void RobotBuilding::step (  )  [virtual]

This function will be called each time unit of the game.

Implements GameController.

void RobotBuilding::updateBelt ( bool  forwards  ) 

void RobotBuilding::updateBox ( int  row,
int  col 
)

void RobotBuilding::updateCommand ( int  row,
int  col 
)


Member Data Documentation

The robot building machine.

bool RobotBuilding::complete [private]

bool RobotBuilding::congrats [private]

int RobotBuilding::curValue [private]

The execute buttom. It builds the robot when clicked.

int RobotBuilding::gameLevel [private]

The various goal robots.

bool RobotBuilding::isMoving [private]

The buttons with the various commands that the used can click on.

The model of the robot being build.

Graphics layers used.

bool RobotBuilding::noerror [private]

int RobotBuilding::numDone [private]

Number of robots completed correctly so far.

int RobotBuilding::stepNum [private]


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

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