Exemplo n.º 1
0
        public static BitEncodedImage GetShipEncodedImage(ApiShip ship)
        {
            var symbols          = ship.Role == ApiPlayerRole.Attacker ? AttackShipSymbols : DefenseShipSymbols;
            var totalMatterCount = ship.Matter.SumAll();
            var symbolIndex      = totalMatterCount >= 256 ? 3 : totalMatterCount >= 16 ? 2 : totalMatterCount > 0 ? 1 : 0;

            return(symbols.GetByIndex(symbolIndex));
        }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public ApiShipAndCommands(ApiShip ship, IEnumerable <ApiShipAppliedCommand> appliedCommands)
 {
     Ship            = ship;
     AppliedCommands = appliedCommands;
 }