public Patron(string name, int ID, UIUpdater uiUpdater) : base(uiUpdater) { this.name = name; patronID = ID; LogStatus($"{name} enters the pub", this); }
public Pub(UIUpdater uiUpdater) { this.uiUpdater = uiUpdater; bouncer = new Bouncer(uiUpdater, allPatrons, PatronProcess); bartender = new Bartender(uiUpdater, glassesInShelf, queueToBar, allPatrons); waiter = new Waiter(uiUpdater, glassesInShelf, glassesOnTables, allPatrons); }
public Bouncer(UIUpdater uiUpdater, ConcurrentDictionary <int, Patron> allPatrons, Action <Patron> createPatronTask) : base(uiUpdater) { this.allPatrons = allPatrons; this.createPatronTask = createPatronTask; }
public Waiter(UIUpdater uiUpdater, ConcurrentQueue <Glass> glassesInShelf, ConcurrentBag <Glass> glassesOnTables, ConcurrentDictionary <int, Patron> allPatrons) : base(uiUpdater) { this.glassesInShelf = glassesInShelf; this.glassesOnTables = glassesOnTables; this.allPatrons = allPatrons; }
public Bartender(UIUpdater uiUpdater, ConcurrentQueue <Glass> glassesInShelf, ConcurrentQueue <Patron> queueToBar, ConcurrentDictionary <int, Patron> allPatrons) : base(uiUpdater) { this.glassesInShelf = glassesInShelf; this.queueToBar = queueToBar; this.allPatrons = allPatrons; }
public SimulationManager() { uiUpdater = new UIUpdater(); pubSimulation = new Pub(uiUpdater); }
protected Agent(UIUpdater uiUpdater) { this.uiUpdater = uiUpdater; }