private static void InitializeAlchemists(IAlchemistsQueue queue) { var random = new Random(); var alchemistTypes = Enum.GetValues(typeof(AlchemistType)); for (int i = 0; i < Configuration.NumberOfAlchemists; i++) { var type = (AlchemistType)alchemistTypes.GetValue(random.Next(alchemistTypes.Length)); var alchemist = new Alchemist(type, queue); new Thread(() => alchemist.Run()).Start(); } }
public Alchemist(AlchemistType type, IAlchemistsQueue queue) { Type = type; this.queue = queue; }