public static void ChooseNextAction(Player player1, StreamReader reader, StreamWriter writer) { //While the player has not been eaten by the wumpus, the player is prompted //for another action. while (player1.IsPlayerAlive() == true) { //Ask the player what they want to do. writer.WriteLine("Shoot or Move (S/M): "); string input = reader.ReadLine(); string playerChoice = input.Trim().ToUpper(); //If player wants to shoot an arrow, they lose an arrow. if (playerChoice == "S") { player1.ShootArrow(); writer.WriteLine("You have {0} arrows.", player1.GetPlayerArrows()); } //If player wants to move, they are prompted for which room and are moved there. else if (playerChoice == "M") { writer.WriteLine("Enter which cave would you like to move to:"); int caveNumber = int.Parse(reader.ReadLine()); EnterCave(player1, caveNumber, writer); } //If player does not choose shoot or move, there is no action and they //will be prompted again. else { writer.WriteLine("Invalid entry"); } } }