02-17-2005, 03:24 AM
Hey everybody. I've written a neat hangman game for my next programming project. I have a list of stored words, and the game randomly picks one (and the user then has to guess it). The problem is with words that have a space between them (for ex: The Simpsons, with a space between "The" and "Simpsons").
Whenever the game gets to a word like that, and the user fills out all the letters in the word, the game doesn't stop like it's supposed to. Instead, it keeps going (since every other letter would be wrong, all you can do is type wrong letters until you lose).
Does anyone know how to help me, so my game CAN read spaces between words?
Whenever the game gets to a word like that, and the user fills out all the letters in the word, the game doesn't stop like it's supposed to. Instead, it keeps going (since every other letter would be wrong, all you can do is type wrong letters until you lose).
Does anyone know how to help me, so my game CAN read spaces between words?