Esempio n. 1
0
    public bool Can_Work(Building building, Work_Type type)
    {
        if (!Worked_By.Exists(x => x.Building == building && x.Type == type))
        {
            return(false);
        }
        Building first = Worked_By.First(x => x.Type == type).Building;

        return(first.Id == building.Id);
    }
Esempio n. 2
0
 public void Add_Workers(Building building, Work_Type type)
 {
     if (!Worked_By.Exists(x => x.Building == building && x.Type == type))
     {
         Worked_By.Add(new WorkData()
         {
             Building = building, Type = type
         });
     }
 }