parent
8778dc2214
commit
7c1aea0f0c
|
@ -266,34 +266,6 @@ class Position {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool doMove(String move) {
|
bool doMove(String move) {
|
||||||
if (move.length > "Player".length &&
|
|
||||||
move.substring(0, "Player".length - 1) == "Player") {
|
|
||||||
if (move["Player".length] == '1') {
|
|
||||||
return resign(PieceColor.black);
|
|
||||||
} else {
|
|
||||||
return resign(PieceColor.white);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
if (move == "Threefold Repetition. Draw!") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (move == "draw") {
|
|
||||||
phase = Phase.gameOver;
|
|
||||||
winner = PieceColor.draw;
|
|
||||||
if (score[PieceColor.draw] != null) {
|
|
||||||
score[PieceColor.draw] = score[PieceColor.draw]! + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
gameOverReason = GameOverReason.drawReasonThreefoldRepetition;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Above is diff from position.cpp
|
|
||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
Move m = Move(move);
|
Move m = Move(move);
|
||||||
|
|
Loading…
Reference in New Issue