public bool CheckSecurityClearence(Floors floor, ClearenceTypes clearence) { switch (clearence) { case ClearenceTypes.Confidential: if (floor == Floors.G) { return(true); } else { return(false); } case ClearenceTypes.Secret: if (floor == Floors.G || floor == Floors.S) { return(true); } else { return(false); } case ClearenceTypes.TopSecret: return(true); default: return(false); } }
public Agent(string name, ClearenceTypes clearence, Floors startingLocation, int busyTime, Elevator elevator) { this.Name = name; this.Clearence = clearence; this.CurrentFloor = startingLocation; this.BusyTime = busyTime; this.CurrentActivity = Constants.defaultActivity; this.elevator = elevator; }