Merge branch 'develop' into bug/133-out-of-range-error-on-focus-nodes

# Conflicts:
#	pubspec.yaml
This commit is contained in:
2025-07-21 13:11:20 +02:00
4 changed files with 5 additions and 3 deletions

View File

@@ -69,6 +69,7 @@ class GameManager extends ChangeNotifier {
gameList[index].roundNumber--;
gameList[index].isGameFinished = true;
gameList[index].setWinner();
notifyListeners();
LocalStorageService.saveGameSessions();
}

View File

@@ -255,7 +255,7 @@ class GameSession extends ChangeNotifier {
isGameFinished = true;
print('${players[i]} hat die 100 Punkte ueberschritten, '
'deswegen wurde das Spiel beendet');
_setWinner();
setWinner();
}
}
}
@@ -298,7 +298,7 @@ class GameSession extends ChangeNotifier {
/// Determines the winner of the game session.
/// It iterates through the player scores and finds the player
/// with the lowest score.
void _setWinner() {
void setWinner() {
int minScore = playerScores.reduce((a, b) => a < b ? a : b);
List<String> lowestPlayers = [];
for (int i = 0; i < players.length; i++) {

View File

@@ -312,6 +312,7 @@ class _ActiveGameViewState extends State<ActiveGameView> {
onPressed: () {
setState(() {
gameManager.endGame(gameSession.id);
_playFinishAnimation(context);
});
Navigator.pop(context);
},

View File

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