Пример #1
0
        private static void SaveGameMenu(BattleShips battleShips, DbContextOptions <ApplicationDbContext> dbOptions)
        {
            var menuSaveGame = new Menu(MenuLevel.LevelBlank);

            menuSaveGame.AddMenuHeader("Do you want to save game?");
            menuSaveGame.AddMenuItem(new MenuItem("Yes", "Y", () =>
            {
                battleShips.SaveGame(dbOptions);

                return("m");
            }));
            menuSaveGame.AddMenuItem(new MenuItem("No", "N", () => "m"));
            menuSaveGame.RunMenu();
        }