I'm attempting to code a basic letter game in python. In the game, the computer moderator picks a word out of a list of possible words. Each player (computer AI and human) is shown a series of blanks, one for each letter of the word. Each player then guesses a letter and a position, and are told one of the following:
1) That letter belongs in that position (the best outcome)
2) That letter is in the word, but not in that position
3) That letter is not in any of the remaining blank spaces
When the word has been fully revealed, the player to guess the most letters correctly wins a point. The computer moderator picks another word and starts again. The first player to five points wins the game. In the basic game, both players share the same set of blanks they're filling in, so the players benefit from each other's work.
My Question---
I've got the random word coming in just fine. Now, I'd like to count the number of characters in the word so I know how many spaces to indicate. How would I go about this?
Once that's working properly, I assume it won't be too hard to compare the player/AI guesses with the word and proceed accordingly.
Thanks!