CreateGameView erstellen #67

Merged
sneeex merged 35 commits from feature/3-creategameview-erstellen into development 2025-12-10 20:43:54 +00:00
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 6c0cb92e56 - Show all commits

View File

@@ -4,7 +4,7 @@ import 'package:game_tracker/core/enums.dart';
import 'package:game_tracker/presentation/widgets/tiles/title_description_list_tile.dart'; import 'package:game_tracker/presentation/widgets/tiles/title_description_list_tile.dart';
class ChooseRulesetView extends StatefulWidget { class ChooseRulesetView extends StatefulWidget {
final List<(Ruleset, String, String)> rulesets; final List<(Ruleset, String)> rulesets;
final int initialRulesetIndex; final int initialRulesetIndex;
const ChooseRulesetView({ const ChooseRulesetView({
@@ -66,8 +66,8 @@ class _ChooseRulesetViewState extends State<ChooseRulesetView> {
} }
}); });
}, },
title: widget.rulesets[index].$2, title: translateRulesetToString(widget.rulesets[index].$1),
description: widget.rulesets[index].$3, description: widget.rulesets[index].$2,
isHighlighted: selectedRulesetIndex == index, isHighlighted: selectedRulesetIndex == index,
); );
}, },

View File

@@ -61,28 +61,24 @@ class _CreateGameViewState extends State<CreateGameView> {
/// The currently selected players /// The currently selected players
List<Player>? selectedPlayers; List<Player>? selectedPlayers;
/// List of available rulesets with their display names and descriptions /// List of available rulesets with their descriptions
/// as tuples of (Ruleset, String, String) /// as tuples of (Ruleset, String)
/// TODO: Replace when rulesets are implemented /// TODO: Replace when rulesets are implemented
List<(Ruleset, String, String)> rulesets = [ List<(Ruleset, String)> rulesets = [
( (
Ruleset.singleWinner, Ruleset.singleWinner,
'Single Winner',
'Exactly one winner is chosen; ties are resolved by a predefined tiebreaker.', 'Exactly one winner is chosen; ties are resolved by a predefined tiebreaker.',
), ),
( (
Ruleset.singleLoser, Ruleset.singleLoser,
'Single Loser',
'Exactly one loser is determined; last place receives the penalty or consequence.', 'Exactly one loser is determined; last place receives the penalty or consequence.',
), ),
( (
Ruleset.mostPoints, Ruleset.mostPoints,
'Most Points',
'Traditional ruleset: the player with the most points wins.', 'Traditional ruleset: the player with the most points wins.',
), ),
( (
Ruleset.leastPoints, Ruleset.leastPoints,
'Least Points',
'Inverse scoring: the player with the fewest points wins.', 'Inverse scoring: the player with the fewest points wins.',
), ),
]; ];