import '../enums.dart'; import '../state/game_state.dart'; import 'command_l10n.dart'; class DrawCommand extends Command { final GameState _gameState; DrawCommand({required GameState gameState}) : _gameState = gameState; @override void execute() { DeckMethods.drawAbilityCards(stateAccess); RoundMethods.sortByInitiative(stateAccess); RoundMethods.setRoundState(stateAccess, RoundState.playTurns); if (_gameState.currentList.isNotEmpty) { _gameState.currentList.first.setTurnState( stateAccess, TurnsState.current, ); } } @override String describe() { return commandL10n.cmdDraw; } }