Small changes & documentation

This commit is contained in:
Felix Kirchner
2025-04-30 00:49:15 +02:00
parent 39ebe39da6
commit 8320e7191b
3 changed files with 14 additions and 13 deletions

View File

@@ -1,13 +1,14 @@
import 'package:cabo_counter/data/round.dart';
/// This class represents a game session for the Cabo game.
/// [gameTitle] is the title of the game.
/// [players] is a string list of player names.
/// [gameHasPointLimit] is a boolean indicating if the game has the
/// default point limit of 101 points or not.
/// This class represents a game session for Cabo game.
/// [createdAt] is the timestamp of when the game session was created.
/// [gameTitle] is the title of the game.
/// [gameHasPointLimit] is a boolean indicating if the game has the default
/// point limit of 101 points or not.
/// [players] is a string list of player names.
/// [playerScores] is a list of the summed scores of all players.
/// [roundNumber] is the current round number.
/// [isGameFinished] is a boolean indicating if the game session is finished.
/// [isGameFinished] is a boolean indicating if the game has ended yet.
/// [winner] is the name of the player who won the game.
class GameSession {
final DateTime createdAt = DateTime.now();
@@ -162,7 +163,7 @@ class GameSession {
roundNum: roundNum,
scores: roundScores,
scoreUpdates: scoreUpdates,
kamikaze: kamikazePlayerIndex,
kamikazePlayerIndex: kamikazePlayerIndex,
);
if (roundNum > roundList.length) {
roundList.add(newRound);