#include #include using std::vector; #include "Output.h" #define BLANK '-' typedef vector SquareId; class Move { public: //dummy constructor Move(){score = -2;} Move(char p, int f, SquareId& c) : column(c) { player = p; face = f; score = -2; } Move(char p, int f, SquareId& c, int s) : column(c) { player = p; face = f; score = s; } //copy constructor Move(const Move& copy){ player = copy.player; face = copy.face; score = copy.score; column = copy.column; } int GetFace() { return face; } int GetPlayer() { return player; } void setPlayer(char p) { player = p; } int GetScore() { return score; } void setScore(int num) { score = num; } SquareId& GetColumn() { return column; } void Print() { OUTPUT("[Player: %c, Face: %d (", player, face); int dimensionality = column.size(); for (int i = 0; i < dimensionality; i++) { if (column[i] == BLANK) { OUTPUT("X"); } else { OUTPUT("%d",column[i]); } if (i != dimensionality-1) OUTPUT(","); } OUTPUT(") SCORE = %i]\n", score); } private: char player; int face; int score; // in this vector the slot is identified by an index in every dimension // except for the face into which the token is inserted SquareId column; };