public void OrderFood(FoodSystem context, int id) { var food = _foodDataAccess.GetFood(id); Console.WriteLine($"You ordered: {food.Name}"); context.SetNextState(new FoodOrderedState(food)); }
public void ListOrderedFood(FoodSystem context) { foreach (var food in _orderedFood) { Console.WriteLine($"Food you ordered: {food.Name}"); } }
public void OrderFood(FoodSystem context, int id) { var food = _foodDataAccess.GetFood(id); Console.WriteLine($"You ordered: {food.Name}"); _orderedFood.Add(food); }
public void ShowFood(FoodSystem context) { Console.WriteLine("Currently we have in stock : "); foreach (var food in _foodDataAccess.GetAllFoods()) { Console.WriteLine($"{food.Name} / for: {food.Price}"); } }
public void Login(FoodSystem context, string user, string pass) { Console.WriteLine($"Logged in as {user}"); context.SetNextState(new LoggedInState()); }
public void ListOrderedFood(FoodSystem context) { Console.WriteLine("You are not logged in yet !"); }
public void OrderFood(FoodSystem context, int id) { Console.WriteLine("You are not logged in yet !"); }
public void ShowFood(FoodSystem context) { Console.WriteLine("You are not logged in yet !"); }
public void ListOrderedFood(FoodSystem context) { Console.WriteLine("No food ordered yet !!!"); }
public void Logout(FoodSystem context) { Console.WriteLine("You logged out!"); context.SetNextState(new GuestUserState()); }
public void Login(FoodSystem context, string user, string pass) { Console.WriteLine("You are already logged in"); }