flutter: Fix warnings

This commit is contained in:
Calcitem 2021-02-12 23:00:16 +08:00
parent e3711d624b
commit 5a15eb7d6a
2 changed files with 4 additions and 4 deletions

View File

@ -392,7 +392,7 @@ class Position {
return pieceOnBoardCount[Color.black] + pieceOnBoardCount[Color.white]; return pieceOnBoardCount[Color.black] + pieceOnBoardCount[Color.white];
} }
int GetNPiecesInHand() { int getNPiecesInHand() {
pieceInHandCount[Color.black] = pieceInHandCount[Color.black] =
rule.piecesCount - pieceOnBoardCount[Color.black]; rule.piecesCount - pieceOnBoardCount[Color.black];
pieceInHandCount[Color.white] = pieceInHandCount[Color.white] =
@ -432,7 +432,7 @@ class Position {
return -1; return -1;
} }
GetNPiecesInHand(); getNPiecesInHand();
pieceToRemoveCount = 0; pieceToRemoveCount = 0;
winner = Color.nobody; winner = Color.nobody;

View File

@ -326,8 +326,8 @@ class _GamePageState extends State<GamePage> with RouteAware {
String getGameOverReasonString(GameOverReason reason, String winner) { String getGameOverReasonString(GameOverReason reason, String winner) {
String loseReasonStr; String loseReasonStr;
String winnerStr = //String winnerStr =
winner == Color.black ? S.of(context).black : S.of(context).white; // winner == Color.black ? S.of(context).black : S.of(context).white;
String loserStr = String loserStr =
winner == Color.black ? S.of(context).white : S.of(context).black; winner == Color.black ? S.of(context).white : S.of(context).black;