Removed prints
This commit is contained in:
@@ -18,8 +18,6 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
sortedPlayerIndices = _getSortedPlayerIndices();
|
sortedPlayerIndices = _getSortedPlayerIndices();
|
||||||
print('Aktuelle Runde: ${widget.gameSession.playerScores[0].length}');
|
|
||||||
print('playerScores: ${widget.gameSession.playerScores}');
|
|
||||||
return CupertinoPageScaffold(
|
return CupertinoPageScaffold(
|
||||||
navigationBar: CupertinoNavigationBar(
|
navigationBar: CupertinoNavigationBar(
|
||||||
middle: Text(widget.gameSession.gameTitle),
|
middle: Text(widget.gameSession.gameTitle),
|
||||||
@@ -104,14 +102,12 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
// Erstelle eine Liste von Indizes der Spieler
|
// Erstelle eine Liste von Indizes der Spieler
|
||||||
List<int> playerIndices =
|
List<int> playerIndices =
|
||||||
List<int>.generate(widget.gameSession.players.length, (index) => index);
|
List<int>.generate(widget.gameSession.players.length, (index) => index);
|
||||||
print('playerIndices: $playerIndices');
|
|
||||||
// Sortiere die Indizes basierend auf den summierten Punkten (playerScores[i][0])
|
// Sortiere die Indizes basierend auf den summierten Punkten (playerScores[i][0])
|
||||||
playerIndices.sort((a, b) {
|
playerIndices.sort((a, b) {
|
||||||
int scoreA = widget.gameSession.playerScores[a][0];
|
int scoreA = widget.gameSession.playerScores[a][0];
|
||||||
int scoreB = widget.gameSession.playerScores[b][0];
|
int scoreB = widget.gameSession.playerScores[b][0];
|
||||||
return scoreA.compareTo(scoreB); // Absteigende Sortierung
|
return scoreA.compareTo(scoreB); // Absteigende Sortierung
|
||||||
});
|
});
|
||||||
print('playerIndices sortiert: $playerIndices');
|
|
||||||
return playerIndices;
|
return playerIndices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user