#include <RobotBuilder.h>
Inherits Layer.

Public Member Functions | |
| RobotBuilder (RobotModel *model) | |
| ~RobotBuilder () | |
| void | setType (int row, int type) |
| Sets the box values of a given row, based on the type given. | |
| void | setValue (int row, int col, int value) |
| Sets the values of the box in the given row and column. | |
| int | getValue (int row, int col) |
| Returns the value of a box. | |
| int | getType (int row, int col) |
| Returns the type of a box. | |
| int | getBuildLocation (int x, int y) |
| Returns the locations of the builder. | |
| int | determineBox (int row, int col) |
| Returns the box number of the box in the given row and column. | |
| void | updateType (int row, int type) |
| bool | errorCheck () |
| Checks to see if their are any errors in the commands entered into the builder. | |
| void | setAction (int commandRow) |
| void | buildRobot () |
| Builds the robot. | |
| void | outputError () |
| Outputs an error message if there is an error. | |
| void | paintAction (int commandRow) |
| int | getNextEndLoop (int commandRow) |
| void | loopAction (int startLine, int endLine) |
| void | updateBox (int row, int col) |
| void | updateCommand (int row, int col) |
Protected Member Functions | |
| int | getRow (int place) |
| int | getColumn (int place) |
Protected Attributes | |
| int | rbuilder [10][3][2] |
| The 3D array holding all the commands. | |
| int | numMetal |
| int | ErType |
| int | ErRow |
| int | ErVal |
| bool | noError |
| Text * | Error |
| RobotModel * | model |
| RobotBox ** | builderBoxes |
| RobotCommand ** | builderCommands |
| bool | headSet |
| bool | headPaint |
| bool | bodySet |
| bool | bodyPaint |
| bool | armsSet |
| bool | armsPaint |
Static Protected Attributes | |
| static const int | setCommand = SetAction |
| static const int | paintCommand = PaintAction |
| static const int | attachCommand = AttachAction |
| static const int | loopCommand = LoopAction |
| static const int | endloopCommand = EndloopAction |
| static const int | headCommand = HeadAction |
| static const int | bodyCommand = BodyAction |
| static const int | armsCommand = ArmsAction |
| static const int | triangleCommand = TriangleAction |
| static const int | circleCommand = CircleAction |
| static const int | rectCommand = RectangleAction |
| static const int | redPaintCommand = RedPaintAction |
| static const int | bluePaintCommand = BluePaintAction |
| static const int | yellowPaintCommand = YellowPaintAction |
| static const int | greenPaintCommand = GreenPaintAction |
| static const int | action = ActionBox |
| static const int | color = ColorBox |
| static const int | shape = ShapeBox |
| static const int | part = PartBox |
| RobotBuilder::RobotBuilder | ( | RobotModel * | model | ) |
| RobotBuilder::~RobotBuilder | ( | ) |
| void RobotBuilder::buildRobot | ( | ) |
Builds the robot.
| int RobotBuilder::determineBox | ( | int | row, | |
| int | col | |||
| ) |
Returns the box number of the box in the given row and column.
| bool RobotBuilder::errorCheck | ( | ) |
Checks to see if their are any errors in the commands entered into the builder.
| int RobotBuilder::getBuildLocation | ( | int | x, | |
| int | y | |||
| ) |
Returns the locations of the builder.
| int RobotBuilder::getColumn | ( | int | place | ) | [protected] |
| int RobotBuilder::getNextEndLoop | ( | int | commandRow | ) |
| int RobotBuilder::getRow | ( | int | place | ) | [protected] |
| int RobotBuilder::getType | ( | int | row, | |
| int | col | |||
| ) |
Returns the type of a box.
| int RobotBuilder::getValue | ( | int | row, | |
| int | col | |||
| ) |
Returns the value of a box.
| void RobotBuilder::loopAction | ( | int | startLine, | |
| int | endLine | |||
| ) |
| void RobotBuilder::outputError | ( | ) |
Outputs an error message if there is an error.
| void RobotBuilder::paintAction | ( | int | commandRow | ) |
| void RobotBuilder::setAction | ( | int | commandRow | ) |
| void RobotBuilder::setType | ( | int | row, | |
| int | type | |||
| ) |
Sets the box values of a given row, based on the type given.
The type given is the command put into the first box of the row, this will determine all the command types which come after it.
| void RobotBuilder::setValue | ( | int | row, | |
| int | col, | |||
| int | value | |||
| ) |
Sets the values of the box in the given row and column.
Unlike the setType method, this method will set the actual command values, not just their types.
| void RobotBuilder::updateBox | ( | int | row, | |
| int | col | |||
| ) |
| void RobotBuilder::updateCommand | ( | int | row, | |
| int | col | |||
| ) |
| void RobotBuilder::updateType | ( | int | row, | |
| int | type | |||
| ) |
const int RobotBuilder::action = ActionBox [static, protected] |
const int RobotBuilder::armsCommand = ArmsAction [static, protected] |
bool RobotBuilder::armsPaint [protected] |
bool RobotBuilder::armsSet [protected] |
const int RobotBuilder::attachCommand = AttachAction [static, protected] |
const int RobotBuilder::bluePaintCommand = BluePaintAction [static, protected] |
const int RobotBuilder::bodyCommand = BodyAction [static, protected] |
bool RobotBuilder::bodyPaint [protected] |
bool RobotBuilder::bodySet [protected] |
RobotBox** RobotBuilder::builderBoxes [protected] |
RobotCommand** RobotBuilder::builderCommands [protected] |
const int RobotBuilder::circleCommand = CircleAction [static, protected] |
const int RobotBuilder::color = ColorBox [static, protected] |
const int RobotBuilder::endloopCommand = EndloopAction [static, protected] |
Text* RobotBuilder::Error [protected] |
int RobotBuilder::ErRow [protected] |
int RobotBuilder::ErType [protected] |
int RobotBuilder::ErVal [protected] |
const int RobotBuilder::greenPaintCommand = GreenPaintAction [static, protected] |
const int RobotBuilder::headCommand = HeadAction [static, protected] |
bool RobotBuilder::headPaint [protected] |
bool RobotBuilder::headSet [protected] |
const int RobotBuilder::loopCommand = LoopAction [static, protected] |
RobotModel* RobotBuilder::model [protected] |
bool RobotBuilder::noError [protected] |
int RobotBuilder::numMetal [protected] |
const int RobotBuilder::paintCommand = PaintAction [static, protected] |
const int RobotBuilder::part = PartBox [static, protected] |
int RobotBuilder::rbuilder[10][3][2] [protected] |
The 3D array holding all the commands.
const int RobotBuilder::rectCommand = RectangleAction [static, protected] |
const int RobotBuilder::redPaintCommand = RedPaintAction [static, protected] |
const int RobotBuilder::setCommand = SetAction [static, protected] |
const int RobotBuilder::shape = ShapeBox [static, protected] |
const int RobotBuilder::triangleCommand = TriangleAction [static, protected] |
const int RobotBuilder::yellowPaintCommand = YellowPaintAction [static, protected] |
1.5.7.1