public void PlaceBulkOrder(int count) { var order = potentialOrders[Random.Range(0, potentialOrders.Length)]; for (int i = 0; i < count; i++) { CurrentOrders.Add(order); } OnOrdersChange?.Invoke(CurrentOrders); }
public bool FulfillsAnOrder(Food food) { foreach (var order in CurrentOrders) { if (order.product.Name == food.Name) { CurrentOrders.Remove(order); OnOrdersChange?.Invoke(CurrentOrders); return(true); } } return(false); }
public Recepie PlaceRandomOrder() { CurrentOrders.Add(potentialOrders[Random.Range(0, potentialOrders.Length)]); OnOrdersChange?.Invoke(CurrentOrders); return(CurrentOrders[CurrentOrders.Count - 1]); }