This is a Python implementation of the Wordle game using Tkinter and the uv library. The game allows players to guess a 5-letter word within 6 attempts, with color feedback (green for correct position, yellow for correct letter but wrong position, gray for incorrect letter).
- Ensure Python 3.11 is installed on your system. You can download it from python.org.
- Download the following files from the submission:
wordle_game.py(the game source code)requirements.txt(list of required libraries)- This
README.mdfile
- Open a terminal or command prompt.
- Navigate to the directory containing the downloaded files.
- Install the required libraries by running the following command:
pip install -r requirements.txt
- Note: Ensure
pipis installed. If not, install it by runningpython -m ensurepip --upgradeandpython -m pip install --upgrade pip. - The
requirements.txtfile includes theuvlibrary and other dependencies needed to run the game.
- Verify the installation by checking that no errors occur during the
pip installcommand.
- After installing the dependencies, run the game by executing the following command in the terminal:
python main.py - The game will launch with a main menu. Click "Start Game" to begin.
- Objective: Guess the 5-letter word in 6 tries or fewer.
- Controls:
- Use the on-screen keyboard or your physical keyboard to input letters.
- Press "ENTER" to submit your guess.
- Press "⌫" (Backspace) to delete the last letter.
- Press "RESTART" to start a new game anytime.
- Press "BACK TO MENU" to return to the main menu.
- Feedback:
- Green: The letter is correct and in the right position.
- Yellow: The letter is in the word but in the wrong position.
- Gray: The letter is not in the word.
- After winning or losing, choose to play another round or return to the main menu.
- The game uses a predefined list of words embedded in the code. No external resource files (e.g., dictionaries) are required.
- If you need to expand the word list, modify the
WORDSlist in the code.