public void Update(MouseInput mouseInput) { if (playRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Play; } else if (loadRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Load; } else if (helpRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Help; } else if (editorRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Editor; } else if (exitRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Exit; } else { menuChoice = MenuChoice.Blank; } }
static Menu() { _prevState = GameState.Exit; CurrentKey = 0; _currentChoice = MenuChoice.Exit; _menu = new Dictionary <int, MenuChoice>(); }
/// <summary> /// The entry point of the program, where the program control starts and ends. /// </summary> /// <param name="args">string[]</param> public static void Main(string[] args) { //TODO: Implement DH logic //TODO: Implement double round robin //TODO: Refactor TeamGroupTree into Composite-Leaf pattern //TODO: Implement full season (162 games) ConfigurationManager.Init(Constants.CONFIG_FILE_PATH, Constants.CONFIG_FILE_DELIMITER); StoredProcedureManager.Init(ConfigurationManager.GetConfigurationValue("STORED_PROCEDURES_DIRECTORY")); VenueManager.Init(ConfigurationManager.GetConfigurationValue("STADIUM_FILE_DIRECTORY"), true); SABRMetricsManager.Init(ConfigurationManager.GetConfigurationValue("SABRMETRICS_DIRECTORY"), true); ConsoleMenu menu = new ConsoleMenu(ConfigurationManager.GetConfigurationValue("TITLE"), true); MenuChoice chooseTeam = new MenuChoice(ViewTeamInformation.Display, "View Team", true); MenuChoice chooseLeague = new MenuChoice(ViewLeagueInformation.Display, "View League", true); MenuChoice playRoundRobin = new MenuChoice(PlayRoundRobin.SelectYear, "Play Round Robin!", true); MenuChoice playSeries = new MenuChoice(PlaySeries.SetUpSeries, "Play Series", true); MenuChoice playWorldSeries = new MenuChoice(PlayChampionshipSeries.SelectWorldSeries, "Replay Championship Series", true); MenuChoice cleanGamesFolder = new MenuChoice(CleanGamesFolder.LoadCleanGamesFolder, "Clean Games Folder", true); MenuChoice exit = new MenuChoice(ProgramExit.Exit, "Exit", true); menu.AddItem(chooseTeam); menu.AddItem(chooseLeague); menu.AddItem(playRoundRobin); menu.AddItem(playSeries); menu.AddItem(playWorldSeries); menu.AddItem(cleanGamesFolder); menu.AddItem(exit); menu.Run(); }
IEnumerator UpdateText() { MenuChoice choice = GetComponentInParent <MenuChoice>(); bool useSign; //Waits until the next frame to continue. This is necessary because it is unlikely that the building is defined at this time. yield return(null); switch (type) { //For the repair type, set the cost to the current repair cost and add a description of the durability to the title. case AutofillTarget.Repair: ProductionBuilding building = choice.targetTile.GetComponent <ProductionBuilding>(); useSign = building.RepairCost != 0; cost.SetText(useSign ? "-" + building.RepairCost.ToString() : "" + building.RepairCost.ToString()); title.SetText(title.text + " (" + building.durability + "/" + building.thisBuilding.durability + ")"); cost.color = useSign ? new Color(0.25f, 0f, 0f) : Color.black; break; //For the sell type we set the cost field to the amount refuned to the player. case AutofillTarget.Sell: useSign = choice.targetTile.building.value != 0; cost.SetText(useSign ? "+" + choice.targetTile.building.value : "" + choice.targetTile.building.value); cost.color = useSign ? new Color(0f, 0.25f, 0f) : Color.black; break; } yield break; }
/// <summary> /// Create a list menu /// </summary> public ListMenu(string menuDescription, string enumName, OnSelection callback, int X = 500, int Y = 100, int width = 280, int height = 520) : base(X, Y, Image.CreateRectangle(width, height)) { //enum magic Type enumType = Type.GetType(enumName); if (enumType == null) throw new ArgumentException("Specified enum type could not be found", nameof(enumName)); //save callback _callback = callback; //register callback for scene add OnAdded += OnAdd; //set enter to blocked on begin to avoid double-entering menus _blockedKeys[2] = true; //set background Graphic.Color = Color.Gray; //draw a info text _infoText = new Text(menuDescription, 48) { X = X, Color = Color.Black, Y = Y - 50 }; //define this entity as part of the menu pause group Group = (int) PauseGroups.Menu; //how to draw a menu follows float paddingPercentage = 0.1f; //Magic.Cast(how many items are in the enum?) int numberOfEnumItems = Enum.GetNames(enumType).Length; int paddingHeight = (int) ((height / numberOfEnumItems) * paddingPercentage); int paddingWidth = (int) ((width / numberOfEnumItems) * paddingPercentage); //height per item int itemHeight = ((height - ((paddingHeight * (numberOfEnumItems + 1)))) / numberOfEnumItems); int itemWidth = width - paddingWidth * 2; //list of the items in the enum Array enumList = Enum.GetValues(enumType);//A wild magical unicorn appears //add menu item for each enum item for (int i = 0; i < enumList.Length; i++){ MenuChoice newChoice = new MenuChoice(X + paddingWidth, Y + paddingHeight + (i * paddingHeight) + i * itemHeight, itemWidth, itemHeight, enumList.GetValue(i).ToString()); _choiceList.Add(newChoice); } }
/// <summary> /// Loads the view team inforamtion. /// </summary> /// <param name="mainMenu">ConsoleMenu</param> public static void LoadChampionshipSeries(ConsoleMenu mainMenu) { ConsoleMenu playWorldSeriesMenu = new ConsoleMenu("Play Championship Series Menu", true); MenuChoice promptForWorldSeriesYear = new MenuChoice(SelectWorldSeries, "Display Team Information", true); playWorldSeriesMenu.AddItem(promptForWorldSeriesYear); mainMenu.AddItem(playWorldSeriesMenu); }
/// <summary> /// Loads the view league inforamtion. /// </summary> /// <param name="mainMenu">ConsoleMenu</param> public static void LoadViewLeagueInforamtion(ConsoleMenu mainMenu) { ConsoleMenu viewTeamInformationMenu = new ConsoleMenu("View League Information", true); MenuChoice displayLeagueInformation = new MenuChoice(Display, "Display League Information", true); viewTeamInformationMenu.AddItem(displayLeagueInformation); mainMenu.AddItem(viewTeamInformationMenu); }
/// <summary> /// Loads the round robin. /// </summary> public static void LoadRoundRobin(ConsoleMenu mainMenu) { ConsoleMenu playRoundRobinMenu = new ConsoleMenu("Play Round Robin", true); MenuChoice promptForRoundRobinYear = new MenuChoice(SelectYear, "Select Year", true); playRoundRobinMenu.AddItem(promptForRoundRobinYear); mainMenu.AddItem(playRoundRobinMenu); }
/// <summary> /// Loads the view team inforamtion. /// </summary> /// <param name="mainMenu">ConsoleMenu</param> public static void LoadViewTeamInforamtion(ConsoleMenu mainMenu) { theMenu = mainMenu; viewTeamInformationMenu = new ConsoleMenu("View Team Information", true); displayTeamInformation = new MenuChoice(Display, "Display Team Information", true); viewTeamInformationMenu.AddItem(displayTeamInformation); theMenu.AddItem(viewTeamInformationMenu); }
public static void Main() { MenuChoice optionSelected = Utilities.GetMenuChoice(); Tuple <bool, string> result = Utilities.ProcessMenuChoice(optionSelected); Utilities.ProcessResult(result); Utilities.ProcessAnotherCertificate(); }
/// <summary> /// Loads the view team inforamtion. /// </summary> /// <param name="mainMenu">ConsoleMenu</param> public static void LoadPlaySeries(ConsoleMenu mainMenu) { ConsoleMenu playSeriesMenu = new ConsoleMenu("Play Series Menu", true); MenuChoice setupTeams = new MenuChoice(SetUpSeries, "Set up Series", true); playSeriesMenu.AddItem(setupTeams); mainMenu.AddItem(playSeriesMenu); }
public bool Start() { Menu menu = new Menu(); SubMenu subMenu = new SubMenu(); MemberRegister memberRegister = new MemberRegister(); MemberInputController memberController = new MemberInputController(memberRegister); BoatInputController boatController = new BoatInputController(memberRegister); menu.DisplayMenu(); MenuChoice menuChoice = menu.GetInput(); switch (menuChoice) { case MenuChoice.RegisterMember: memberController.AddMember(); break; case MenuChoice.DeleteMember: memberController.DeleteMember(); break; case MenuChoice.ShowMemberList: subMenu.DisplayMenu(); MenuChoice subMenuChoice = subMenu.GetInput(); if (subMenuChoice == MenuChoice.ShowCompactMemberList) { memberController.ShowCompactMemberList(); } else if (subMenuChoice == MenuChoice.ShowVerboseMemberList) { memberController.ShowVerboseMemberList(); } break; case MenuChoice.UpdateMemberInformation: memberController.UpdateMember(); break; case MenuChoice.AddBoat: boatController.AddBoat(); break; case MenuChoice.RemoveBoat: boatController.RemoveBoat(); break; case MenuChoice.UpdateBoat: boatController.UpdateBoat(); break; case MenuChoice.ShowMemberInformation: memberController.ShowMember(); break; } return(menuChoice != MenuChoice.Exit); }
public static void Main(String[] args) { var serviceProvider = new ServiceCollection() .AddTransient <IMovieService, MovieService>() .BuildServiceProvider(); var movieService = serviceProvider.GetService <IMovieService>(); var menu = new MenuChoice(movieService); menu.DisplayMenu(); }
public bool Run() { try { memberView.PresentMenu(); MenuChoice choice = memberView.SelectChoice(); switch (choice) { case MenuChoice.RegisterMember: RegisterMember(); return(true); case MenuChoice.DeleteMember: DeleteMember(); return(true); case MenuChoice.ShowMemberList: ShowMemberList(); return(true); case MenuChoice.SpecificMemberInfo: SpecificMemberInfo(); return(true); case MenuChoice.ChangeMemberInfo: ChangeMemberInfo(); return(true); case MenuChoice.RegisterBoat: RegisterBoat(); return(true); case MenuChoice.DeleteBoat: DeleteBoat(); return(true); case MenuChoice.ChangeBoatInfo: ChangeBoatInfo(); return(true); case MenuChoice.Quit: default: return(false); } } catch (Exception ex) { memberView.PresentErrorMessage(ex.Message); return(true); } }
/// <summary> /// Adds a new game Windows menu selection that will be available to send as a input for this specific game /// Windows. /// </summary> /// <param name="action">Method that will be run when the choice is made.</param> /// <param name="command">Associated input that will trigger the respective action in the active game Windows.</param> /// <param name="description">Text that will be shown to user so they know what the choice means.</param> private void AddCommand(Action action, TCommands command, string description) { // Check to make sure the menu choice does not already exist in out collection. var menuChoice = new MenuChoice <TCommands>(command, action, description); if (_menuCommands.Contains(menuChoice)) { return; } // Adds the input to the list of possible choices. _menuCommands.Add(menuChoice); }
public ListMenu(string menuDescription, List <string> choiceNames, OnSelection callback, int X = 500, int Y = 100, int width = 280, int height = 520) : base(X, Y, Image.CreateRectangle(width, height)) { //save callback _callback = callback; //register callback for scene add OnAdded += OnAdd; //set enter to blocked on begin to avoid double-entering menus _blockedKeys[2] = true; //set background Graphic.Color = Color.Gray; //draw a info text _infoText = new Text(menuDescription, 48) { X = X, Color = Color.Black, Y = Y - 50 }; //define this entity as part of the menu pause group Group = (int)PauseGroups.Menu; //how to draw a menu follows float paddingPercentage = 0.1f; //Magic.Cast(how many items are in the enum?) int numberOfEnumItems = choiceNames.Count; int paddingHeight = (int)((height / numberOfEnumItems) * paddingPercentage); int paddingWidth = (int)((width / numberOfEnumItems) * paddingPercentage); //height per item int itemHeight = ((height - ((paddingHeight * (numberOfEnumItems + 1)))) / numberOfEnumItems); int itemWidth = width - paddingWidth * 2; //add menu item for each enum item for (int i = 0; i < choiceNames.Count; i++) { MenuChoice newChoice = new MenuChoice(X + paddingWidth, Y + paddingHeight + (i * paddingHeight) + i * itemHeight, itemWidth, itemHeight, choiceNames[i]); _choiceList.Add(newChoice); } }
/// <summary> /// Loads the team. /// </summary> /// <param name="searchTerm">string</param> /// <param name="secondPass">bool</param> /// <param name="capitalizeNames">If set to <c>true</c> capitalize names.</param> private static Team LoadTeam(string searchTerm, bool secondPass = false, bool capitalizeNames = true) { Team team = null; Db database = null; try { database = new Db(MainClass.conn); team = DatabaseTeamLoader.LoadTeamFromTeamID(searchTerm, year, database); if (team != null) { team.CapitalizeNames = capitalizeNames; return(team); } } catch (Exception ex) { //Eat this one ex.Message.ToString(); //Console.WriteLine($"Unable to load team with search term '{searchTerm}'"); //Console.WriteLine(ex.Message); } //First check to see if we get multiple teams if (!secondPass) { keys = DatabaseTeamLoader.GetMultipleKeys(searchTerm, year, database); Console.WriteLine($"Found {keys.Count} results for search term '{searchTerm} {year}.'"); teamChoices = new ConsoleMenu("Teams...", true); foreach (string key in keys.Keys) { Console.WriteLine(keys[key]); MenuChoice teamChoice = new MenuChoice(ChooseTeam, keys[key], true); teamChoices.AddItem(teamChoice); } teamChoices.Parent = displayTeamInformation; teamChoices.Run(); } else if (keys.Count == 2) { team = DatabaseTeamLoader.LoadTeamFromFranchiseID(searchTerm, year, database); team.CapitalizeNames = capitalizeNames; } else if (keys.Count == 1) { team = DatabaseTeamLoader.LoadTeamFromFranchiseID(searchTerm, year, database); team.CapitalizeNames = capitalizeNames; } return(team); }
// GET: MenuChoice public ActionResult Index() { var today = DateTime.Today; var mc = new MenuChoice(); var dbmenus = (from s in db.Menus where DbFunctions.TruncateTime(s.Date) == today select s).ToList(); var test = (from s in db.Menus where DbFunctions.TruncateTime(s.Date) == today select s).FirstOrDefault(); if (test == null) { return(Redirect("~/menuchoice/Create")); } { var dbmc = (from s in db.MenuChoices select s).ToList(); } var menus = from left in db.MenuChoices join right in db.Choices on left.ChoiceId equals right.Id into temp from right in temp.DefaultIfEmpty() select new { left, right }; var choices = from right in db.Choices join left in db.MenuChoices on right.Id equals left.ChoiceId into temp from left in temp.DefaultIfEmpty() select new { left, right }; var f = menus.Union(choices); List <MenuChoice> mclist = new List <MenuChoice>(dbmenus.ToList().Count()); for (int i = 0; i < dbmenus.Count; i++) { int j = dbmenus[i].Id; mc.Menu = dbmenus[i]; mc.Choices = (from right in db.Choices join left in db.MenuChoices on right.Id equals left.ChoiceId into temp from left in temp.DefaultIfEmpty() where left.MenuId == j select right).ToList(); mclist.Add(new MenuChoice(mc.Menu, mc.Choices)); } return(View(mclist)); }
static void Main(string[] args) { // Seance march 9th //Console.WriteLine("\n-------------------------------------------------------\n"); // test of class Chauffeur, Bus et Voyages Console.WriteLine("# Exam 2012 #\n"); showMenu(); MenuChoice menuChoice = GetChoice(); while (menuChoice != MenuChoice.Quit) { switch (menuChoice) { case MenuChoice.AddBus: AddBus(); break; case MenuChoice.AddVoyage: AddVoyage(); break; case MenuChoice.ListAllVoyage: ListAllVoyages(); break; case MenuChoice.ListAllVoyageBetweenTwoDates: foreach (var v in ListAllVoyageBetweenTwoDates()) { Console.WriteLine(v.ToString()); } break; case MenuChoice.NbrVoyageurCurrentYear: Console.WriteLine("Nbr de voyageurs dans l'annees en cours est {0}.", NbrVoyageurCurrentYear()); break; } showMenu(); menuChoice = GetChoice(); } Console.WriteLine("Good Bye!"); }
public GameObject roundOverviewObj; // Set via inspector // Use this for initialization void Start() { Master.getInstance().Log("Level select scene starts"); if (Master.getInstance().multiplayer) { AppWarp.connectionStatusEvent += connectionStatusHandler; AppWarp.initialize(); status = StatusCode.CONNECTING; mode = MenuMode.MP_WAITING; } else { status = StatusCode.CONNECTED; mode = MenuMode.SP_SETUP; } customChoice = new MenuChoice(); }
/// <summary> /// Prompts the user to input a choice for the main menu and returns a valid choice. /// </summary> /// <returns>The MenuChoice corresponding to the input.</returns> static MenuChoice GetMenuChoice() { const string invalidChoiceMessage = "ERROR: Invalid choice"; Console.WriteLine(string.Empty.PadLeft(40, '#')); Console.WriteLine("Welcome to Ship Hunter!"); Console.WriteLine(string.Empty.PadLeft(40, '#')); bool choiceMade = false; MenuChoice choice = MenuChoice.Classic; do { Console.WriteLine(); Console.WriteLine(string.Empty.PadLeft(30, '=')); Console.WriteLine(" 1) Classic"); Console.WriteLine(" 2) Versus"); Console.WriteLine(" 3) Load Replay"); Console.WriteLine(string.Empty.PadLeft(30, '=')); Console.Write("Enter a number: "); char input = Console.ReadKey().KeyChar; switch (input) { case '1': choice = MenuChoice.Classic; choiceMade = true; break; case '2': choice = MenuChoice.Versus; choiceMade = true; break; case '3': choice = MenuChoice.LoadReplay; choiceMade = true; break; default: PrintError(invalidChoiceMessage); break; } }while (!choiceMade); return(choice); }
public void Run(double elapsedSeconds) { if (game.Input.KeyDown == System.Windows.Forms.Keys.Enter) { if (userChoice == MenuChoice.Restart) { stateManager.ChangeGameState(GameStates.Main); ((MainState)stateManager.CurrentGameState).CurrentLevel = levelManager.GetCurrentLevel(); } else if (userChoice == MenuChoice.BackToGame) { userChoice = MenuChoice.Restart; stateManager.ChangeGameState(GameStates.Main); } } else if ((game.Input.KeyDown == System.Windows.Forms.Keys.Up || game.Input.KeyDown == System.Windows.Forms.Keys.Down)) { if (userChoice == MenuChoice.BackToGame) { userChoice = MenuChoice.Restart; } else { userChoice = MenuChoice.BackToGame; } Color temp = continueColor; continueColor = restartColor; restartColor = temp; } if (!menuForm.Visible) { menuForm.ShowDialog(); } // AHH, ugly //game.FillRectangle(new SolidBrush(Color.FromArgb(15, 50, 50, 50)), new Rectangle(0, 0, game.Width, game.Height)); game.DrawString( "Continue", new Font("Arial", 16), new SolidBrush(continueColor), new Rectangle(0, 0, game.Width, game.Height - 50), stringFormat); game.DrawString("Restart", new Font("Arial", 16), new SolidBrush(restartColor), new Rectangle(0, 0, game.Width, game.Height), stringFormat); }
static void Main(string[] args) { MenuChoice choice = GetMenuChoice(); switch (choice) { case MenuChoice.Classic: PlayClassicGame(); break; case MenuChoice.Versus: PlayVersusGame(); break; case MenuChoice.LoadReplay: // TODO break; } }
public static void MenuGenerator() // !!!ДОПИСАТЬ!!! { //юзает состояние игры в целом if (_prevState == GameStates.GameState) { return; } _menu.Clear(); switch (GameStates.GameState) { case GameState.MainMenu: { _menu.Add(0, MenuChoice.StartGame); _menu.Add(1, MenuChoice.Settings); _menu.Add(2, MenuChoice.Exit); break; } case GameState.Pause: { _menu.Add(0, MenuChoice.Resume); _menu.Add(1, MenuChoice.ExitToMenu); _menu.Add(2, MenuChoice.Exit); break; } case GameState.GameOver: { _menu.Add(0, MenuChoice.StartGame); _menu.Add(1, MenuChoice.ExitToMenu); _menu.Add(2, MenuChoice.Exit); break; } } if (_menu.Count > 0) { _currentChoice = _menu[0]; CurrentKey = 0; } _prevState = GameStates.GameState; }
public void Write(StringBuilder builder, MenuChoice menuChoice) { if (builder == null || menuChoice == null) { return; } var persistentMenuChoice = menuChoice as PersistentMenuChoice; Write(builder, persistentMenuChoice); var ConsumableMenuChoice = menuChoice as ConsumableMenuChoice; Write(builder, ConsumableMenuChoice); var ContinuingMenuChoice = menuChoice as ContinuingMenuChoice; Write(builder, ContinuingMenuChoice); }
private void PresentMenuChoice() { if (CurrentMenuChoice == 1) { menuChoiceSwitch = MenuChoice.play; } else if (CurrentMenuChoice == 2) { menuChoiceSwitch = MenuChoice.settings; } else if (CurrentMenuChoice == 3) { menuChoiceSwitch = MenuChoice.highscore; } else if (CurrentMenuChoice == 4) { menuChoiceSwitch = MenuChoice.credits; } else if (CurrentMenuChoice == 5) { menuChoiceSwitch = MenuChoice.quit; } }
public void Update(MouseInput mouseInput) { if (resumeRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Resume; } else if (saveRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Save; } else if (loadRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Load; } else if (menuRect.Contains((int)mouseInput.Pos.X, (int)mouseInput.Pos.Y)) { menuChoice = MenuChoice.Menu; } else { menuChoice = MenuChoice.Blank; } }
// 위 방향 버튼을 누른 경우 public void HandleUp() { currentMenuChoice = currentMenuChoice.Previous(); }
// 아래 방향 버튼을 누른 경우 public void HandleDown() { currentMenuChoice = currentMenuChoice.Next(); }
public ListMenu(string menuDescription, List<string> choiceNames, OnSelection callback, int X = 500, int Y = 100, int width = 280, int height = 520) : base(X, Y, Image.CreateRectangle(width, height)) { //save callback _callback = callback; //register callback for scene add OnAdded += OnAdd; //set enter to blocked on begin to avoid double-entering menus _blockedKeys[2] = true; //set background Graphic.Color = Color.Gray; //draw a info text _infoText = new Text(menuDescription, 48) { X = X, Color = Color.Black, Y = Y - 50 }; //define this entity as part of the menu pause group Group = (int)PauseGroups.Menu; //how to draw a menu follows float paddingPercentage = 0.1f; //Magic.Cast(how many items are in the enum?) int numberOfEnumItems = choiceNames.Count; int paddingHeight = (int)((height / numberOfEnumItems) * paddingPercentage); int paddingWidth = (int)((width / numberOfEnumItems) * paddingPercentage); //height per item int itemHeight = ((height - ((paddingHeight * (numberOfEnumItems + 1)))) / numberOfEnumItems); int itemWidth = width - paddingWidth * 2; //add menu item for each enum item for (int i = 0; i < choiceNames.Count; i++) { MenuChoice newChoice = new MenuChoice(X + paddingWidth, Y + paddingHeight + (i * paddingHeight) + i * itemHeight, itemWidth, itemHeight, choiceNames[i]); _choiceList.Add(newChoice); } }
public Menu() { this.menuChoice = MenuChoice.Blank; }
// 초기에는 게임시작 버튼 하이라이트 void Start() { currentMenuChoice = MenuChoice.Start; Show(); }
public void Run() { Console.OutputEncoding = Encoding.UTF8; Console.BackgroundColor = ConsoleColor.DarkGreen; Console.ForegroundColor = ConsoleColor.White; Console.Clear(); _activeDeck = ShuffleDeck(_activeDeck); while (true) { MenuChoice menuChoice = ShowMainMenu(); if (menuChoice == MenuChoice.PlayGame) { PlayerSelectionScreen(); Console.Clear(); while (true) { LetPlayerPlaceBet(); DealHand(_activeDeck, _currentPlayer, _dealer); PlayerPlayHand(); if (_currentPlayer.HandValue <= 21) { PlayDealerHand(); } HandResult handResult = CheckHandResult(); DisplayHandResult(handResult); UpdatePlayerChipCount(handResult); _dataAccess.UpdatePlayer(_currentPlayer); ClearHand(); if (_activeDeck.PlayingCards.Count < 10) { ReshuffleDeck(); } if (!PlayAnotherHand()) { break; } } } else if (menuChoice == MenuChoice.ShowHighscore) { ShowHighscore(); } else if (menuChoice == MenuChoice.ExitGame) { ShowExitScreen(); break; } } }