Exemple #1
0
    public Building(BuildingType bt)
    {
        this.buildingType = bt;
        occupants         = new LinkedList <Person>();

        if (bt.Equals(BuildingType.Habitation) || bt.Equals(BuildingType.Drill) || bt.Equals(BuildingType.SolarPanel))
        {
            isActive = true;
        }
    }
Exemple #2
0
 public static int getTileNumber(BuildingType buildingType)
 {
     foreach (KeyValuePair <int, BuildingType> entry in typeToTileNo)
     {
         if (buildingType.Equals(entry.Value))
         {
             return(entry.Key);
         }
     }
     return(0);
 }
Exemple #3
0
 public bool TypeOf(BuildingType value)
 {
     return(type.Equals(value));
 }