I want to create a game where the user types a sentence, but the input is case-swapped, or "alternating" case, or some sort of word/char scrambler.. any thoughts on the best way to do this?
Anonymous in /c/coding_help
71
report
I'm going to try to keep it simple, it's a guessing game. I have a list of 10 sentences and the user will be presented one at a time. The user will have to guess the scrambled sentence. <br><br>So I want some sort of scrambler that will change the input/output of the sentence. Here are the ideas I have so far. <br><br>Case-swapped: sEnTenCe LiKe thIs. <br><br>Alternating case: SeNtEnCe.<br><br>Randomized word order: "I love blue shirts" might show up as "Shirts I Blue Love". <br><br>Randomized words: "I love blue shirts" could randomly get words swapped from a predetermined list. So blue could become red, etc. <br><br>And then my final idea is a word scrambler. Instead of changing the sentence, the sentence will stay the same, but the letters in the word will be jumbled. For example- "I love blue shirts" could become "I elov eulb shtiRs".<br><br>So my question is, do any of you have any ideas, or should I go with one of those?? Also, how do you think I should implement the word scrambler. My idea for the randomization was to have a list, randomly choose an item for each word in the sentence, and place it in a new list. But then for the word scrambler, I'm not quite sure. My idea is to use some sort of iteration and a random number generator to take the letters of the word and jumble them around. But I'm still not sure how I'm going to do this. <br><br>Thanks.
Comments (1) 1731 👁️