예제 #1
0
 public ApiGameResponse(long successFlag, ApiGameStage gameStage, ApiJoinGameInfo gameInfo, ApiUniverse universe)
     : base(successFlag)
 {
     GameStage = gameStage;
     GameInfo  = gameInfo;
     Universe  = universe;
 }
예제 #2
0
 public PlanetWarsState(long level, PlanetWarsStatus status, long playerKey, ApiPlayerRole myRole, long totalScore, ApiPlayerStatus gameResultStatus, ApiShip selectedShip, IEnumerable <ApiShipCommand> commands, ApiCommandType editingCommand, ApiUniverse universe, ApiJoinGameInfo gameJoinInfo, ApiGameLog gameLog, ApiShipMatter shipMatter)
 {
     Level            = level;
     Status           = status;
     PlayerKey        = playerKey;
     MyRole           = myRole;
     TotalScore       = totalScore;
     GameResultStatus = gameResultStatus;
     SelectedShip     = selectedShip;
     Commands         = commands;
     EditingCommand   = editingCommand;
     Universe         = universe;
     GameJoinInfo     = gameJoinInfo;
     GameLog          = gameLog;
     ShipMatter       = shipMatter;
 }
예제 #3
0
        public static PlanetWarsState InitialForShowGame(long playerKey, ApiGameLog log)
        {
            var universe = new ApiUniverse(0, log.Planet, log.Ticks.Head().Ships);

            return(new PlanetWarsState(
                       level: 0,
                       PlanetWarsStatus.InitialForShowGame,
                       playerKey,
                       ApiPlayerRole.Viewer,
                       totalScore: 0,
                       ApiPlayerStatus.ReadyToGo,
                       selectedShip: null,
                       commands: null,
                       ApiCommandType.None,
                       universe: universe,
                       gameJoinInfo: null,
                       gameLog: log,
                       shipMatter: null));
        }