+/** Checks for victory by attrition (destroying all mobile pieces)
+ *
+ * @returns OK for no victory,
+ * DRAW if both players have no pieces, or
+ * VICTORY_ATTRITION if the current player has won by attrition
+ */
+MovementResult Game::CheckVictoryAttrition()
+{
+ if (theBoard.MobilePieces(Piece::OppositeColour(turn)) == 0)
+ {
+ if (theBoard.MobilePieces(turn) == 0)
+ return MovementResult::DRAW;
+ else
+ return MovementResult::VICTORY_ATTRITION;
+ }
+ return MovementResult::OK;