RobotCommand Class Reference
[Robot building minigame]

#include <RobotCommand.h>

Inherits Sprite.

Collaboration diagram for RobotCommand:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 RobotCommand (int type, int value, Point point)
int getType ()
 Returns the command type.
int getValue ()
 Returns the command value.
void setType (int type)
 Sets the command type.
void setValue (int value)
 Sets the command value.
void draw (BITMAP *canvas, Point offset)
 The basic draw() function.

Protected Member Functions

void setSprite ()

Protected Attributes

int commandType
 The command type.
int commandValue
 The command value.


Detailed Description

A command that the builder recognizes as a type of rudimentary code. Each command as two values associated with it; the type of command it is, and then the specific value within that type subset.

Constructor & Destructor Documentation

RobotCommand::RobotCommand ( int  type,
int  value,
Point  point 
)


Member Function Documentation

void RobotCommand::draw ( BITMAP *  canvas,
Point  offset 
) [virtual]

The basic draw() function.

This is literally

draw_sprite(canvas, sprite, (location + offset));

although the position has to be split back into x and y components.

Reimplemented from Sprite.

int RobotCommand::getType (  ) 

Returns the command type.

Reimplemented from Sprite.

int RobotCommand::getValue (  ) 

Returns the command value.

void RobotCommand::setSprite (  )  [protected]

void RobotCommand::setType ( int  type  ) 

Sets the command type.

void RobotCommand::setValue ( int  value  ) 

Sets the command value.


Member Data Documentation

int RobotCommand::commandType [protected]

The command type.

int RobotCommand::commandValue [protected]

The command value.


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

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