コード例 #1
0
ファイル: Town.cs プロジェクト: demadaha/DMTools
        //Later there will be a map of the town.

        public Town(TownGenerator townGen, string strSize, List <Building> lstReqBuildings)
        {
            name        = townGen.generateName();
            population  = townGen.generatePopulation(strSize);
            buildings   = new List <Building>(lstReqBuildings);
            information = townInfo();
        }
コード例 #2
0
        public frmTown()
        {
            InitializeComponent();

            List <Building> allBuildings = getBuildingInfo("..\\..\\Buildings.xml");

            townGen = new TownGenerator(allBuildings);


            //Fill in the listbox of building names with the building list
            foreach (Building building in allBuildings)
            {
                lbxAddBuilding.Items.Add(building.getName());
            }

            //It should already be set to sort but make sure
            lbxAddBuilding.Sorted = true;
        }