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 Login(FoodSystem context, string user, string pass) { Console.WriteLine($"Logged in as {user}"); context.SetNextState(new LoggedInState()); }
public void Logout(FoodSystem context) { Console.WriteLine("You logged out!"); context.SetNextState(new GuestUserState()); }