/*----- MENU FOR PLAYER WHEN IN JAIL -----*/ public void displayInJailPlayerChoice(Player player) { int resp = 0; Console.WriteLine("\n{0}Please make a selection:\n", playerPrompt(player)); Console.WriteLine("\t1. Attempt to roll doubles to get Released"); Console.WriteLine("\t2. View your details"); Console.WriteLine("\t3. Trade Property with Player"); Console.WriteLine("\t4. Mortgage Property"); Console.WriteLine("\t5. Pay $50"); //read response resp = inputInteger(); //if response is invalid redisplay menu if (resp == 0) this.displayInJailPlayerChoice(player); switch (resp) { case 1: player.hasRolledDoublesInJail(); //this.displayInJailPlayerChoice(player); Console.WriteLine("\n\tPress ENTER to continue"); Console.ReadLine(); break; case 2: Console.WriteLine("\n\t=================================="); Console.WriteLine(player.FullDetailsToString()); Console.WriteLine("\t===================================="); this.displayInJailPlayerChoice(player); break; case 3: this.tradeProperty(player); this.displayInJailPlayerChoice(player); break; case 4: this.mortgageProperty(player); this.displayInJailPlayerChoice(player); break; case 5: player.payFine(); Console.WriteLine("\n\tPress ENTER to continue"); Console.ReadLine(); break; default: Console.WriteLine("\n\tThat option is not available!"); displayInJailPlayerChoice(player); return; } }
/*----- main menu display for players when playing -----*/ public void displayPlayerChoiceMenu(Player player) { if (player.getJailStats() == true) { int resp = 0; Console.WriteLine("\n\t1. End Turn"); resp = inputInteger(); switch (resp) { case 1: break; } } else { int resp = 0; Console.WriteLine("\n{0}Please make a selection:\n", playerPrompt(player)); Console.WriteLine("\t1. Finish turn"); Console.WriteLine("\t2. View your details"); Console.WriteLine("\t3. Purchase This Property"); Console.WriteLine("\t4. Buy House for Property"); Console.WriteLine("\t5. Trade Property with Player"); Console.WriteLine("\t7. Mortgage Property"); Console.WriteLine("\t8. Unmortgage Property"); //if (player.getJailStats() == true && player.firstTurnInJail == false) //{ // Console.WriteLine("\t6. Pay $50.00 fine to get out of Jail"); //} Console.Write("\t(1-7)>"); //read response resp = inputInteger(); //if response is invalid redisplay menu if (resp == 0) this.displayPlayerChoiceMenu(player); //perform choice according to number input switch (resp) { case 1: //set firstTimeInJail to false to reset condition of player's first turn in Jail //player.firstTurnInJail = false; break; case 2: Console.WriteLine("\n\t=================================="); Console.WriteLine(player.FullDetailsToString()); Console.WriteLine("\t===================================="); this.displayPlayerChoiceMenu(player); break; case 3: this.purchaseProperty(player); this.displayPlayerChoiceMenu(player); break; case 4: this.buyHouse(player); this.displayPlayerChoiceMenu(player); break; case 5: this.tradeProperty(player); this.displayPlayerChoiceMenu(player); break; case 6: player.payFine(); this.displayPlayerChoiceMenu(player); break; case 7: this.mortgageProperty(player); this.displayPlayerChoiceMenu(player); break; case 8: this.unMortgageProperty(player); this.displayPlayerChoiceMenu(player); break; default: Console.WriteLine("That option is not avaliable. Please try again."); this.displayPlayerChoiceMenu(player); break; } } }