|
|
 This is only a preview of the paper Click here to register and get the full text. Existing members click here to login
|
|
|
#include #define SUCCESS 0 #define FAILURE -1 #define MOVED_LEFT 100 #define MOVED_RIGHT 101 #define MOVED_UP 102 #define MOVED_DOWN 103 #define ROTATED_CLOCKWISE 104 #define ROTATED_COUNTERCLOCKWISE 105 #define ACTION 200 #define FREE_STATMENT 201 #define OCCUPY_STATMENT 202 #define CONJUNCTION 203 typedef struct stack_object { int type; int objectNumber; int xTopLeft; int yTopLeft; int xButtomRight; int yButtomRight; // if the stack_object is a conjunction - here will be a pointer to an array // of stack_objects . each entry in this array in either a FREE_STATMENT or // an OCCUPY_STATMENT . don't forget to delete the array when your'e done with it. stack_object ** conjunctionArray; }stack_object; //a shortcut to make stacks that accept stack_object to push and pop //#define argstack list ////////////////////////// functions: ////////////////////////////////// stack_object getTopStackObject(); ////////////////////////////////////////////////////////////////////////////// /// function name : gfi (stands for "Go For It!!!") /// /// need arguments: int lastMove - what kind of action was last made /// int lastObjectMoved what object moved the lastMove /// those arguments are needed to maintain a prevention /// system that will keep object from moving back and forth.
Approximate Word count = 408 Approximate Pages = 1.6 (250 words per page double spaced)
|
|
|
|
|
|