- from_index(index);
- db[index] = (sideToMove == WHITE ? classify_white(db) : classify_black(db));
- return db[index];
- }
-
- Result KPKPosition::classify_white(const Result db[]) {
-
- // If one move leads to a position classified as RESULT_WIN, the result
- // of the current position is RESULT_WIN. If all moves lead to positions
- // classified as RESULT_DRAW, the current position is classified RESULT_DRAW
- // otherwise the current position is classified as RESULT_UNKNOWN.
+ // White to Move: If one move leads to a position classified as RESULT_WIN,
+ // the result of the current position is RESULT_WIN. If all moves lead to
+ // positions classified as RESULT_DRAW, the current position is classified
+ // RESULT_DRAW otherwise the current position is classified as RESULT_UNKNOWN.
+ //
+ // Black to Move: If one move leads to a position classified as RESULT_DRAW,
+ // the result of the current position is RESULT_DRAW. If all moves lead to
+ // positions classified as RESULT_WIN, the position is classified RESULT_WIN.
+ // Otherwise, the current position is classified as RESULT_UNKNOWN.