public CGameMapParameters copy() { var ret = new CGameMapParameters(); ret.numPositions_ = numPositions_; if (numStartingCities_ != null) { ret.numStartingCities_ = new int[numStartingCities_.Length]; for (int i = 0; i < numStartingCities_.Length; i++) { ret.numStartingCities_[i] = numStartingCities_[i]; } } ret.needCapitals_ = needCapitals_; ret.needImportant_ = needImportant_; ret.numImportant_ = numImportant_; return(ret); }
public virtual void prepare( int mapWidth, bool horzWrap, int mapHeight, bool vertWrap, CDLLHints hints, CGameMapParameters mparams, WBQueryI unitData, StringPollerI distributor, MapCallbackI callback, string logpath, string logname, int loglevel) { if (reallogger_ == null) { reallogger_ = new CLog(logpath, logname, loglevel); logger_ = new CSubLog("MapMaker", reallogger_); } distributor_ = distributor; callback_ = callback; unitData_ = unitData; mapUtil_ = new CMapUtil(mapWidth, horzWrap, mapHeight, vertWrap); mparams_ = mparams; //build the map output for (int i = 0; i < mapWidth * mapHeight; i++) { mapLocs_.Add(new TempMapStruct()); } //the default seed - object may get replaced random_ = new CMTRandom(); }