import 'player.dart'; class Game { List players = []; int numWolves; Game(this.numWolves); void addPlayer(String name) { players.add(Player(name: name)); } void assignRoles() { List indexes = List.generate(players.length, (index) => index)..shuffle(); for (var player in players) { player.role = 'Dorfbewohner'; // Reset roles } for (int i = 0; i < numWolves; i++) { players[indexes[i]].role = 'Werwolf'; } } void incrementWolves() { if (numWolves < players.length) { numWolves++; } } void decrementWolves() { if (numWolves > 1) { numWolves--; } } void toggleReveal(int index) { players[index].isRevealed = !players[index].isRevealed; } }