diff --git a/src/ui/flutter/lib/mill/position.dart b/src/ui/flutter/lib/mill/position.dart index 50d14f6f..c7fa23d9 100644 --- a/src/ui/flutter/lib/mill/position.dart +++ b/src/ui/flutter/lib/mill/position.dart @@ -264,7 +264,7 @@ class Position { // step counter //ss += '${recorder?.halfMove ?? 0} ${recorder?.fullMove ?? 0}'; - print("fen = " + ss); + //print("fen = " + ss); return ss; } @@ -306,7 +306,7 @@ class Position { */ bool ret = false; - print("position: command = $move"); + //print("doMove $move"); if (move.length > "Player".length && move.substring(0, "Player".length - 1) == "Player") { @@ -578,7 +578,7 @@ class Position { // not in moveTable if (md == moveDirectionNumber) { - print("putPiece: [$s] is not in [$currentSquare]'s moveTable"); + print("putPiece: [$s] is not in [$currentSquare]'s move table."); return false; } } @@ -742,7 +742,7 @@ class Position { } bool checkGameOverCondition() { - print("Checking game over condition ..."); + //print("Is game over?"); if (phase == Phase.ready || phase == Phase.gameOver) { return true; @@ -752,7 +752,7 @@ class Position { winner = Color.draw; phase = Phase.gameOver; gameOverReason = GameOverReason.drawReasonRule50; - print("Game over, draw, because of $gameOverReason"); + print("Game over, draw, because of $gameOverReason."); return true; } @@ -768,7 +768,7 @@ class Position { } bool isNoWay = isAllSurrounded(); - print("phase = $phase, action = $action, isAllSurrounded = $isNoWay"); + //print("phase = $phase, action = $action, isAllSurrounded = $isNoWay"); if (phase == Phase.moving && action == Act.select && isNoWay) { if (rule.isLoseButNotChangeSideWhenNoWay) { setGameOver( @@ -776,12 +776,12 @@ class Position { return true; } else { changeSideToMove(); // TODO: Need? - print("Game is not over"); + //print("Game is not over"); return false; } } - print("Game is NOT over"); + //print("Game is NOT over"); return false; } @@ -1417,14 +1417,14 @@ class Position { // Full if (pieceCountOnBoard[Color.black] + pieceCountOnBoard[Color.white] >= rankNumber * fileNumber) { - print("Board is full."); + //print("Board is full."); return true; } // Can fly if (pieceCountOnBoard[sideToMove()] <= rule.nPiecesAtLeast && rule.allowFlyWhenRemainThreePieces) { - print("Can fly."); + //print("Can fly."); return false; } @@ -1443,7 +1443,7 @@ class Position { } } - print("No way."); + //print("No way."); return true; } @@ -1500,7 +1500,7 @@ class Position { String moves = ""; int posAfterLastRemove = 0; - print("recorder.movesCount = ${recorder.movesCount}"); + //print("recorder.movesCount = ${recorder.movesCount}"); for (i = recorder.movesCount - 1; i >= 0; i--) { //if (recorder.moveAt(i).type == MoveType.remove) break; @@ -1511,17 +1511,17 @@ class Position { posAfterLastRemove = i + 1; } - print("[movesSinceLastRemove] posAfterLastRemove = $posAfterLastRemove"); + //print("[movesSinceLastRemove] posAfterLastRemove = $posAfterLastRemove"); for (int i = posAfterLastRemove; i < recorder.movesCount; i++) { moves += " ${recorder.moveAt(i).move}"; } - print("moves = $moves"); + //print("moves = $moves"); var idx = moves.indexOf('-('); if (idx != -1) { - print("moves[$idx] is -("); + //print("moves[$idx] is -("); assert(false); } @@ -1535,7 +1535,7 @@ class Position { void changeSideToMove() { them = _sideToMove; _sideToMove = Color.opponent(_sideToMove); - print("Change sideToMove to $_sideToMove"); + print("$_sideToMove to move."); } get halfMove => recorder.halfMove; diff --git a/src/ui/flutter/lib/painting/pieces_painter.dart b/src/ui/flutter/lib/painting/pieces_painter.dart index 25568570..fe72e76d 100644 --- a/src/ui/flutter/lib/painting/pieces_painter.dart +++ b/src/ui/flutter/lib/painting/pieces_painter.dart @@ -138,7 +138,7 @@ class PiecesPainter extends PiecesBasePainter { canvas.drawCircle(pps.pos, pieceInnerRadius, paint); break; case Piece.ban: - print("pps.piece is Ban"); + //print("pps.piece is Ban"); break; default: assert(false); diff --git a/src/ui/flutter/lib/widgets/board.dart b/src/ui/flutter/lib/widgets/board.dart index 7ac20546..d22a8e5a 100644 --- a/src/ui/flutter/lib/widgets/board.dart +++ b/src/ui/flutter/lib/widgets/board.dart @@ -80,13 +80,13 @@ class Board extends StatelessWidget { final column = (dx - padding) ~/ squareWidth; if (column < 0 || column > 6) { - print("Tap on column $column skip"); + print("Tap on column $column (ignored)."); return; } final row = (dy - padding - digitsHeight) ~/ squareWidth; if (row < 0 || row > 6) { - print("Tap on row $row skip"); + print("Tap on row $row (ignored)."); return; } diff --git a/src/ui/flutter/lib/widgets/game_page.dart b/src/ui/flutter/lib/widgets/game_page.dart index 95799fbf..736c40c6 100644 --- a/src/ui/flutter/lib/widgets/game_page.dart +++ b/src/ui/flutter/lib/widgets/game_page.dart @@ -54,7 +54,7 @@ class _GamePageState extends State { @override void initState() { - print("engineType = ${widget.engineType}"); + print("Engine type: ${widget.engineType}"); Game.shared.setWhoIsAi(widget.engineType); @@ -65,7 +65,7 @@ class _GamePageState extends State { changeStatus(String status) { if (context == null) { - print("[changeStatus] context == null, return"); + //print("[changeStatus] context == null, return"); return; } @@ -74,7 +74,7 @@ class _GamePageState extends State { void showTips() { if (context == null) { - print("[showTips] context == null, return"); + //print("[showTips] context == null, return"); return; } @@ -105,7 +105,7 @@ class _GamePageState extends State { int sq = indexToSquare[index]; if (sq == null) { - print("putPiece skip index: $index"); + //print("putPiece skip index: $index"); return; } @@ -251,7 +251,7 @@ class _GamePageState extends State { changeStatus(S.of(context).gameStarted); if (Game.shared.isAiToMove()) { - print("New Game: AI's turn."); + print("New game, AI to move."); engineToGo(); } }