From ef06033e16b8181be50363ea9a7c7d16b13b9cec Mon Sep 17 00:00:00 2001 From: Calcitem Date: Mon, 30 Nov 2020 01:05:38 +0800 Subject: [PATCH] =?UTF-8?q?flutter:=20=E8=A7=A3=E5=86=B3=20score=20?= =?UTF-8?q?=E7=BB=8F=E5=B8=B8=E8=A2=AB=E6=B8=85=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/flutter/lib/mill/position.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ui/flutter/lib/mill/position.dart b/src/ui/flutter/lib/mill/position.dart index 17978565..9a0b75e1 100644 --- a/src/ui/flutter/lib/mill/position.dart +++ b/src/ui/flutter/lib/mill/position.dart @@ -176,7 +176,7 @@ class Position { } Position() { - score[Color.black] = score[Color.white] = score[Color.draw] = nPlayed = 0; + //score[Color.black] = score[Color.white] = score[Color.draw] = nPlayed = 0; init(); } @@ -715,8 +715,6 @@ class Position { setGameOver(Color.opponent(loser), GameOverReason.loseReasonResign); - updateScore(); - return true; } @@ -729,6 +727,7 @@ class Position { gameOverReason = reason; winner = w; print("Game over, $w win, becase of $reason"); + updateScore(); } void updateScore() { @@ -1502,6 +1501,8 @@ class Position { moves += " ${recorder.moveAt(i).move}"; } + print("moves = $moves"); + return moves.length > 0 ? moves.substring(1) : ''; }