flutter: Remove unused code in doMove

Added by fe1f1d1816
This commit is contained in:
Calcitem 2021-05-01 13:01:39 +08:00
parent 8778dc2214
commit 7c1aea0f0c
1 changed files with 0 additions and 28 deletions

View File

@ -266,34 +266,6 @@ class Position {
}
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;
Move m = Move(move);