/// <summary> /// Creates a new PirateGameEx, initialized with a game turn state /// Initializes lists of game objects /// </summary> /// <param name="pirateGame">Current game turn state</param> public PirateGameEx(PirateGame pirateGame) { Game = pirateGame; // PirateEx lists MyPirates = CreateExList(Game.GetAllMyPirates()); MyLivingPirates = CreateExList(Game.GetMyLivingPirates()); EnemyPirates = CreateExList(Game.GetAllEnemyPirates()); EnemyLivingPirates = CreateExList(Game.GetEnemyLivingPirates()); // IslandEx lists MyIslands = CreateExList(Game.GetMyIslands()); NeutralIslands = CreateExList(Game.GetNeutralIslands()); EnemyIslands = CreateExList(Game.GetEnemyIslands()); // DroneEx lists MyLivingDrones = CreateExList(Game.GetMyLivingDrones()); EnemyLivingDrones = CreateExList(Game.GetEnemyLivingDrones()); // CityEx lists MyCities = CreateExList(Game.GetMyCities()); EnemyCities = CreateExList(Game.GetEnemyCities()); // AircraftEx lists MyLivingAircrafts = CreateExList(Game.GetMyLivingAircrafts()); EnemyLivingAircrafts = CreateExList(Game.GetEnemyLivingAircrafts()); MyAircrafts = ConvertList <PirateEx, AircraftEx>(MyPirates).Concat(ConvertList <DroneEx, AircraftEx>(MyLivingDrones)).ToList(); EnemyAircrafts = ConvertList <PirateEx, AircraftEx>(EnemyPirates).Concat(ConvertList <DroneEx, AircraftEx>(EnemyLivingDrones)).ToList(); }