Skip to content

WeeeeeeeeeeS/Introduction-To-Computer-Science-Final-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Anagram Guess Game

A word guessing game where Player 1 picks a secret word and Player 2 tries to guess it using anagrams.

How to Play

  1. Run the game: python anagram_game.py
  2. The game reads a story file and extracts words (3-5 letters)
  3. Player 1 (computer) picks a random secret word
  4. You enter a word of the same length
  5. The game creates an anagram and Player 2's algorithm guesses the word

Files

  • anagram_game.py - Main game code
  • story.txt - Input story file
  • words.txt - Generated words file (3-5 letter words from story)

Functions

  • generate_anagrams(word) - Creates all possible anagrams of a word
  • evaluate(guess, word) - Counts letters in correct positions
  • filter_candidates(candidates, guess, feedback) - Filters candidates based on feedback

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages