コード例 #1
0
        /// <summary>
        /// Initialize and Allocate Arrays for the Maps, Histories
        /// </summary>
        private void InitMapArrays()
        {
            Map = new ushort[Constants.WorldWidth, Constants.WorldHeight];

            ResHist       = new short[Constants.HistoryLength];
            ComHist       = new short[Constants.HistoryLength];
            IndHist       = new short[Constants.HistoryLength];
            MoneyHist     = new short[Constants.HistoryLength];
            PollutionHist = new short[Constants.HistoryLength];
            CrimeHist     = new short[Constants.HistoryLength];
            MiscHist      = new short[Constants.MiscHistoryLength];

            PopulationDensityMap   = new ByteMap2();
            TrafficDensityMap      = new ByteMap2();
            PollutionDensityMap    = new ByteMap2();
            LandValueMap           = new ByteMap2();
            CrimeRateMap           = new ByteMap2();
            TerrainDensityMap      = new ByteMap4();
            RateOfGrowthMap        = new ShortMap8();
            PowerGridMap           = new ByteMap1();
            FireStationMap         = new ShortMap8();
            FireStationEffectMap   = new ShortMap8();
            PoliceStationMap       = new ShortMap8();
            PoliceStationEffectMap = new ShortMap8();
            ComRateMap             = new ShortMap8();
        }
コード例 #2
0
        /// <summary>
        /// Simulator constructor.
        /// </summary>
        public Micropolis()
        {
            PopulationDensityMap = new ByteMap2();
            TrafficDensityMap    = new ByteMap2();
            PollutionDensityMap  = new ByteMap2();
            LandValueMap         = new ByteMap2();
            CrimeRateMap         = new ByteMap2();
            TerrainDensityMap    = new ByteMap4();

            TempMap1 = new ByteMap2();
            TempMap2 = new ByteMap2();
            TempMap3 = new ByteMap2();

            PowerGridMap           = new ByteMap1();
            RateOfGrowthMap        = new ShortMap8();
            FireStationMap         = new ShortMap8();
            FireStationEffectMap   = new ShortMap8();
            PoliceStationMap       = new ShortMap8();
            PoliceStationEffectMap = new ShortMap8();
            ComRateMap             = new ShortMap8();

            init();
        }