From 18606508dc9ceaedf11540fb60c9ab2a4f938e7d Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Tue, 29 Apr 2025 23:57:27 +0200 Subject: [PATCH] Implemented new Round data class --- lib/data/round.dart | 19 +++++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/data/round.dart diff --git a/lib/data/round.dart b/lib/data/round.dart new file mode 100644 index 0000000..76b444b --- /dev/null +++ b/lib/data/round.dart @@ -0,0 +1,19 @@ +/// This class represents a single round in the game. +/// It is stored within the [GameSession] class. +/// [roundNum] is the number of the round its reppresenting. +/// [scores] is a list of the actual scores the players got. +/// [scoreUpdates] is a list of how the players scores updated this round. +/// [kamikaze] is the index of the player who got kamikaze. If no one got +/// kamikaze, this value is null. +class Round { + final int roundNum; + List scores; + List scoreUpdates; + int? kamikaze; + + Round( + {required this.roundNum, + required this.scores, + required this.scoreUpdates, + this.kamikaze}); +} diff --git a/pubspec.yaml b/pubspec.yaml index e6b6584..048a6bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game CABO" publish_to: 'none' -version: 0.1.3+57 +version: 0.1.3+63 environment: sdk: ^3.5.4