A word guessing game where Player 1 picks a secret word and Player 2 tries to guess it using anagrams.
- Run the game:
python anagram_game.py - The game reads a story file and extracts words (3-5 letters)
- Player 1 (computer) picks a random secret word
- You enter a word of the same length
- The game creates an anagram and Player 2's algorithm guesses the word
anagram_game.py- Main game codestory.txt- Input story filewords.txt- Generated words file (3-5 letter words from story)
generate_anagrams(word)- Creates all possible anagrams of a wordevaluate(guess, word)- Counts letters in correct positionsfilter_candidates(candidates, guess, feedback)- Filters candidates based on feedback