Computer Science Canada Hangman? |
Author: | xevious [ Thu Nov 17, 2005 9:50 pm ] |
Post subject: | Hangman? |
I'm making a hangman game, and I've run into a slight problem. I can't get words with two common letters to work using index. Do I need to find some alternate way to search for letters in the work, or can index be used in some way that I do not know? |
Author: | MysticVegeta [ Thu Nov 17, 2005 10:45 pm ] |
Post subject: | |
posting the game would help. |
Author: | beard0 [ Thu Nov 17, 2005 10:49 pm ] |
Post subject: | |
when looking for all instances of a letter, you look using index, for the first occurence, and if it's not 0, look in the substring that is the rest of the word, using index, repeat. |