/// <summary> /// Create a new Wiretap object. /// </summary> public GameState() { this.wiretap = null; this.dummyCPs = new List <ChokePoint>(); // define countries this.Countries = new Country[10]; this.Countries[0] = new Country(0, "NONE", Language.Country_Name_NoCountry, Language.Country_Name_NoCountry, Side.None); this.Countries[1] = new Country(1, "UK", Language.Country_Name_England, Language.Country_Demonym_England, Side.Allied); this.Countries[2] = new Country(2, "US", Language.Country_Name_USA, Language.Country_Demonym_USA, Side.Allied); // also bridge destroyed state this.Countries[3] = new Country(3, "FR", Language.Country_Name_France, Language.Country_Demonym_France, Side.Allied); this.Countries[4] = new Country(4, "DE", Language.Country_Name_Germany, Language.Country_Demonym_Germany, Side.Axis); this.Countries[5] = new Country(5, "IT", Language.Country_Name_Italy, Language.Country_Demonym_Italy, Side.None); this.Countries[6] = new Country(6, "JP", Language.Country_Name_Japan, Language.Country_Demonym_Japan, Side.None); this.Countries[7] = new Country(7, "CW", Language.Country_Name_Commonwealth, Language.Country_Demonym_Commonwealth, Side.None); this.Countries[8] = new Country(8, "NF", Language.Country_Name_NeutralFriendly, Language.Country_Name_NeutralFriendly, Side.Neutral); // was China this.Countries[9] = new Country(9, "NH", Language.Country_Name_NeutralHostile, Language.Country_Name_NeutralHostile, Side.Neutral); // was Russia // get ranks this.Ranks = Data.GetRanks(); // initialise empty game object collections this.ChokePoints = new ChokePoint[0]; this.Facilities = new Facility[0]; this.Bridges = new Bridge[0]; this.HCUnits = new Dictionary <int, HCUnit>(); this.Factories = new Dictionary <int, Factory>(); this.Links = new SymmetricHash <int, SupplyLink>(); this.Firebases = new Dictionary <int, Firebase>(); this.Squads = new Dictionary <int, Squad>(); this.MapCells = new Dictionary <Point, MapCell>(); this.Servers = new Dictionary <int, Server>(); this.MoveResults = new HCUnitMoveResult[0]; this.VehicleCategories = new VehicleCategory[0]; this.VehicleClasses = new VehicleClass[0]; this.Vehicles = new Vehicle[0]; this.Toes = new ObservableDictionary <string, Toe>(); this.ServerParams = new Dictionary <string, ServerParam>(); this.AlliedFrontline = new Frontline(Side.Allied); this.AxisFrontline = new Frontline(Side.Axis); this.MapCellSize = 1000; }
public MessageBroker(INewsRepository repo) { _repo = repo; head = new Pipe(); router = new StoryRouter(); var wiretap = new Wiretap { WiretapPipe = new Pipe() }; new ContentEnricher { Input = head, Output = new Pipe() }.Then(wiretap).Then(router); //wiretap.Then(router); new DbStoreFilter(repo) { Input = wiretap.WiretapPipe }; }