Implement possibilty to reopen game

This commit is contained in:
2025-07-24 22:41:24 +02:00
parent 96afb05e5e
commit 06204f0d36
2 changed files with 7 additions and 1 deletions

View File

@@ -247,17 +247,23 @@ class GameSession extends ChangeNotifier {
List<int> updatePoints() {
List<int> bonusPlayers = [];
_sumPoints();
bool limitExceeded = false;
if (isPointsLimitEnabled) {
bonusPlayers = _checkHundredPointsReached();
for (int i = 0; i < playerScores.length; i++) {
if (playerScores[i] > pointLimit) {
isGameFinished = true;
limitExceeded = true;
print('${players[i]} hat die 100 Punkte ueberschritten, '
'deswegen wurde das Spiel beendet');
setWinner();
}
}
if (!limitExceeded) {
isGameFinished = false;
}
}
notifyListeners();
return bonusPlayers;

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo"
publish_to: 'none'
version: 0.5.3+596
version: 0.5.3+597
environment:
sdk: ^3.5.4