return Piece::BOULDER;
}
+/**
+ * Gets the opposite to the indicated colour
+ */
+Piece::Colour Piece::OppositeColour(const Colour & colour)
+{
+ switch (colour)
+ {
+ case Piece::RED:
+ return Piece::BLUE;
+ break;
+ case Piece::BLUE:
+ return Piece::RED;
+ break;
+ case Piece::BOTH:
+ return Piece::BOTH;
+ break;
+ case Piece::NONE:
+ return Piece::NONE;
+ }
+}
+
/**
* Construct a new, empty board
* @param newWidth - the width of the board
{
return MovementResult(MovementResult::IMMOBILE_UNIT);
}
+ if (multiplier < 1)
+ return MovementResult(MovementResult::INVALID_DIRECTION); //Don't allow moves that don't actually move forward
if (multiplier > 1 && target->type != Piece::SCOUT)
{
return MovementResult(MovementResult::INVALID_DIRECTION); //Can only move a scout multiple times.