Fixed bug with wrong round winner

This commit is contained in:
2025-07-24 22:13:21 +02:00
parent 883c122b6f
commit afed5fd9a3
2 changed files with 5 additions and 2 deletions

View File

@@ -308,7 +308,10 @@ class _RoundViewState extends State<RoundView> {
// Iterate through the scores to find the player with the minimum score // Iterate through the scores to find the player with the minimum score
for (int i = 1; i < scores.length; i++) { for (int i = 1; i < scores.length; i++) {
if (scores[i] < minScore) {
// Check if the current score is less than the minimum score
// and is not negative (to avoid bonus points being considered)
if (scores[i] < minScore && !(scores[i] < 0)) {
minScore = scores[i]; minScore = scores[i];
winnerIndex = i; winnerIndex = i;
} }

View File

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