The Word Shuffle game is a puzzle that shuffles the letters of a word. For this assignment, your program will select a word and will create a jumble or mixed up version of the word. The player of the game must then guess what the original word was before it had been shuffled.

Write a program that selects a word and produces a "jumbled" version. For example, the letters of the word "TAKEN" might be scrambled as "AKNET".

The shuffling of the letters should be random. This means, for example, that your program shouldn't follow a predictable shuffling algorithm, such as always moving the first letter of a word to the end of the word. Ten shuffles is more than enough to jumble a 5 or 6 letter word. Hint: To randomize the scrambling, use the Random class.

Here is a link to a dataset of English words. This is the dataset that you should use to select a word to scramble. The word should be selected at random.

Here are the specific rules for the game:

  • The game is played with two players competing against each other to get the highest score. During each turn, the player is presented with a scrambled word. They need to guess the original word before it was shuffled.
  • During each turn, the player gets a maximum number of 5 chances to guess the original word. Once the player has entered 5 guesses, the word is revealed, the player loses their turn, and game-play is transferred to the other player.
  • Your program should keep track of the players' scores. Here is how points are accumulated:
    • If the player guesses the word correctly on their first try, they get 5 points.
    • If the player guesses the word correctly on their second try, they get 4 points.
    • If the player guesses the word correctly on their third try, they get 3 points.
    • If the player guesses the word correctly on their fourth try, they get 2 points.
    • If the player guesses the word correctly on their fifth try, they get 1 point.
    • If the player does not successfully guess the word within five tries, they get 0 points, and game-play is passed over to the opposing player. Before the end of their turn, the correct word should be revealed to the player.
  • At any point, the player should be able to forfeit their turn to request to see the word. If the player chooses to have the word revealed, they will not gain any points for that round.
  • As soon as a player reaches a score of 40 or greater, the game is over and that player wins the game.

You may not use StringBuilder to solve this problem.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.