private void PopulateOffMapAreas() { _offMapAreaMap = new Dictionary <Factions, OffMap>(); IDbCommand dbcmd = _dbConn.CreateCommand(); string sqlQuery = "SELECT FactionId, Provinces, MinorPlanets, MajorPlanets, Starbases FROM OffMap"; dbcmd.CommandText = sqlQuery; IDataReader reader = dbcmd.ExecuteReader(); while (reader.Read()) { Factions faction = (Factions)(reader.GetInt32(0)); int provinces = reader.GetInt32(1); int minor = reader.GetInt32(2); int major = reader.GetInt32(3); int sbs = reader.GetInt32(4); _offMapAreaMap[faction] = new OffMap(provinces, minor, major, sbs); } reader.Close(); dbcmd.Dispose(); }
private int GetOffMapEconomicPoints(OffMap offMap) { return(offMap.MajorPlanetCount * 5 + offMap.MinorPlanetCount * 2 + offMap.ProvinceCount * 2); }
public SupplyGrid(List <MapNode> hexes, OffMap offMapArea) { _gridCells = hexes; _offMapResources = offMapArea; _storedEconomicPoints = 0; }