public void GoShopping(Store store) { if (UI.GetInput($"{name} would you like to visit the store for supplies? <yes/no>", "yes/no") == "yes") { UI.GoShopping(this, store); } }
static void Main(string[] args) { Game game = new Game(); do { game.RunGame(); } while (UI.GetInput("Would you like to play again? <yes/no>", "yes/no") == "yes"); }
private void SetupHumanPlayers() { int playerCount; playerCount = int.Parse(UI.GetInput("How many human players will there be?", "integer greater than 0")); for (int i = 0; i < playerCount; i++) { players.Add(new Human(store)); players[i].SetPlayerName($"Player {i + 1}"); } }
public void SetPlayerName(string playerLabel) { Name = UI.GetInput($"Enter {playerLabel}'s name:", "string"); }