cli-games
cli-games copied to clipboard
Wordle
CLI Wordle Game
This PR introduces a CLI implementation of the popular word-guessing game "Wordle". The game is entirely text-based and playable in the terminal. Users have six attempts to guess the hidden word with feedback provided on each guess (correct, incorrect, or partially correct letters).
Wordle By The New Times: https://www.nytimes.com/games/wordle/index.html
Features
- Fully functional Wordle game with a 6-guess limit.
- Feedback for each guessed word based on letter correctness:
- Correct letters in the right position are marked in green.
- Correct letters in the wrong position are marked in yellow.
- Incorrect letters are marked in white.
- Random word generation from a predefined word list.
- Text-based interface using ANSI colors for visual feedback. (Function borrowed from code @salif)
- Smooth game loop with user input handling and dynamic board display.
Preview
How to Play
Use games.sh
- Run
./games.sh - Select
[7] Wordle
Run Directly
- Clone the repository and navigate to the
cli-gamesdirectory. - Ensure
Node.jsis installed on your system. - Run the game with:
npm run play
Notes
- Additional instructions on playing the game is provided in
Wordle/README.md - Closes #85
Would love if we can get this PR to be hacktoberfest-accepted as well 😄
Thank you!