public void AddFood(Enums.Foodtype type, int amount) { FoodCount[FoodCount.FindIndex(x => x.foodtype == type)] = new Food() { foodtype = type, Amount = amount }; }
public int GetFood(Enums.Foodtype type) { return(database.GetFood(type)); }
public int GetFood(Enums.Foodtype type) { return(FoodCount.Where(x => x.foodtype == type).Select(x => x.Amount).First()); }
public void AddFood(Enums.Foodtype type, int amount) { database.AddFood(type, amount); }