Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
        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");
        }
Exemplo n.º 3
0
        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}");
            }
        }
Exemplo n.º 4
0
 public void SetPlayerName(string playerLabel)
 {
     Name = UI.GetInput($"Enter {playerLabel}'s name:", "string");
 }