jumble words

How to create the Jumble word game using GUI . I want to create a jumble words I have a word “ni ceepa ster” i want to re arrange it to
"in peace rest " using jumble words using GUI i want to jumble words if player keep wrong word it should turn red and player should again be able to drag that wrong words to another place as long as he place the word in correct place it should turn green then he should not able to move that word


  1. Code something that jumbles words up
  2. Code something that displays this in the GUI
  3. Code something that turns red when the player gets it wrong; green when correct
  4. Code something that allows the player to drag the wrong words to another place and prevent the player from dragging some (correct) words

That is how you create the game. Really, this is several questions (4 or more).

For #1, split the phrase into separate words by cutting it up where there is whitespace (spaces). Then, randomize the characters in each word. Luckily for you, I found someone that already coded basically the exact same thing by searching for javascript string randomize in Google.

For #2, you can either use the OnGUI() function, or use GUIText. Your choice.

For #3, this shouldn’t be that difficult. Just change background color (will be easier when using GUIText).

For #4, there are a lot of questions and answers on dragging.

You have 236 reputation and several badges (at time of writing), which means you should know your way around UA. You should know to ask neater questions (and to use better titles).