Added print statements for debugging

This commit is contained in:
Felix Kirchner
2025-04-22 11:15:38 +02:00
parent fb0e6515a1
commit a2dacad96c
2 changed files with 24 additions and 5 deletions

View File

@@ -27,6 +27,18 @@ class GameSession {
'playerScores: $playerScores]');
}
/// Returns a string representation of the scores for a specific round.
/// The method takes a round number as a parameter and returns a string
/// containing the name of each player and their corressponding score in
/// the given round.
String printRoundScores(int round) {
String result = '';
for (int i = 0; i < players.length; i++) {
result += '${players[i]}: ${playerScores[i][round]}\n';
}
return result;
}
/// Expands the player score lists by adding a new score of 0 for each player.
/// This method is called when a new round starts so the lists in the
/// active game view expands