Exemplo n.º 1
0
    public static GameCommand GenerateGameCommand(GameCommandTypes commandType, Type subPhase, string parameters = null, bool isRpc = false)
    {
        GameCommand command = null;

        switch (commandType)
        {
        case GameCommandTypes.DamageDecksSync:
            command = new DamageDeckSyncCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SquadsSync:
            command = new SquadsSyncCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.Decision:
            command = new DecisionCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ObstaclePlacement:
            command = new ObstaclePlacementCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ShipPlacement:
            command = new ShipPlacementCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.AssignManeuver:
            command = new AssignManeuverCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.PressNext:
            command = new PressNextCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ActivateAndMove:
            command = new ActIvateAndMoveCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.DeclareAttack:
            command = new DeclareAttackCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.DiceModification:
            command = new DiceModificationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SelectShip:
            command = new SelectShipCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncDiceResults:
            command = new SyncDiceResultsCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncDiceRerollSelected:
            command = new SyncDiceRerollSelectedCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ConfirmCrit:
            command = new ConfirmCritCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ConfirmDiceCheck:
            command = new ConfirmDiceCheckCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.PressSkip:
            command = new PressSkipCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.HotacSwerve:
            command = new HotacSwerveCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.HotacFreeTargetLock:
            command = new HotacFreeTargetLockCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncPlayerWithInitiative:
            command = new SyncPlayerWithInitiativeCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SystemActivation:
            command = new SystemActivationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.CombatActivation:
            command = new CombatActivationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SelectObstacle:
            command = new SelectObstacleCommand(commandType, subPhase, parameters);
            break;

        default:
            Console.Write("Constructor for GameCommand is not found", LogTypes.Errors, true, "red");
            break;
        }

        string receivedString = (isRpc) ? " (rpc)": "";

        Console.Write("Command is generated" + receivedString + ": " + command.Type, LogTypes.GameCommands, false, "aqua");

        return(command);
    }
Exemplo n.º 2
0
    public static GameCommand GenerateGameCommand(GameCommandTypes commandType, Type subPhase, string parameters = null, bool isRpc = false)
    {
        GameCommand command = null;

        switch (commandType)
        {
        case GameCommandTypes.DamageDecksSync:
            command = new DamageDeckSyncCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SquadsSync:
            command = new SquadsSyncCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.Decision:
            command = new DecisionCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ObstaclePlacement:
            command = new ObstaclePlacementCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ShipPlacement:
            command = new ShipPlacementCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.AssignManeuver:
            command = new AssignManeuverCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.PressNext:
            command = new PressNextCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ActivateAndMove:
            command = new ActivateAndMoveCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SelectShipToAssignManeuver:
            command = new SelectShipToAssignManeuverCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.DeclareAttack:
            command = new DeclareAttackCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.DiceModification:
            command = new DiceModificationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SelectShip:
            command = new SelectShipCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncDiceResults:
            command = new SyncDiceResultsCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncDiceRerollSelected:
            command = new SyncDiceRerollSelectedCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ConfirmCrit:
            command = new ConfirmCritCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.ConfirmDiceCheck:
            command = new ConfirmDiceCheckCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.PressSkip:
            command = new PressSkipCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SyncPlayerWithInitiative:
            command = new SyncPlayerWithInitiativeCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SystemActivation:
            command = new SystemActivationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.CombatActivation:
            command = new CombatActivationCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.SelectObstacle:
            command = new SelectObstacleCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.BombPlacement:
            command = new BombPlacementCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.MoveObstacle:
            command = new MoveObstacleCommand(commandType, subPhase, parameters);
            break;

        case GameCommandTypes.CancelShipSelection:
            command = new CancelShipSelectionCommand(commandType, subPhase, parameters);
            break;

        default:
            break;
        }

        return(command);
    }