Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Play Another Game?
- *
- * @return True: Again; False: End Program;
- *
- */
- public boolean playAgain()
- {
- while(true)
- {
- System.out.print("Would you like to play again? (y/n): ");
- String s = in.next();
- if((s == "y") || (s == "Y") || (s == "n") || (s == "N"))
- {
- if((s == "n") || (s == "N"))
- return false;
- newGame();
- return true;
- }
- }
- }
Add Comment
Please, Sign In to add comment