X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=home%2Fprogcomp%2Fjudge%2Fmanager%2Fmovementresult.h;fp=home%2Fprogcomp%2Fjudge%2Fmanager%2Fmovementresult.h;h=0000000000000000000000000000000000000000;hp=5a2aed6d36b1eedbf8b19eef099abf54965ce508;hb=88fc5a96c424e9a451b98f3b680bc1980345320d;hpb=e3b15cd5dea739f7523920d83bda592db95a7b93 diff --git a/home/progcomp/judge/manager/movementresult.h b/home/progcomp/judge/manager/movementresult.h deleted file mode 100644 index 5a2aed6..0000000 --- a/home/progcomp/judge/manager/movementresult.h +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Contains declaration for MovementResult class - */ -#ifndef MOVERESULT_H -#define MOVERESULT_H - -class Board; -class Piece; - -/** - * Class used to indicate the result of a move in stratego - */ -class MovementResult -{ - public: - typedef enum {OK, DIES, KILLS, BOTH_DIE, NO_BOARD, INVALID_POSITION, NO_SELECTION, NOT_YOUR_UNIT, IMMOBILE_UNIT, INVALID_DIRECTION, POSITION_FULL, VICTORY, SURRENDER, BAD_RESPONSE, NO_MOVE, COLOUR_ERROR, ERROR, DRAW_DEFAULT, DRAW, BAD_SETUP} Type; - - MovementResult(const Type & result = OK, const Piece::Type & newAttackerRank = Piece::NOTHING, const Piece::Type & newDefenderRank = Piece::NOTHING) - : type(result), attackerRank(newAttackerRank), defenderRank(newDefenderRank) {} - MovementResult(const MovementResult & cpy) : type(cpy.type), attackerRank(cpy.attackerRank), defenderRank(cpy.defenderRank) {} - virtual ~MovementResult() {} - - - bool operator==(const Type & equType) const {return type == equType;} - bool operator!=(const Type & equType) const {return type != equType;} - - Type type; - Piece::Type attackerRank; - Piece::Type defenderRank; -}; - -#endif //MOVERESULT_H - -//EOF