Welcome to Word Scramble, a simple yet fun game where you test your word-guessing skills! The game randomly selects a word, scrambles its letters, and challenges you to guess the correct word within three attempts.
- Play directly in the command-line interface (CLI).
- Option to run a web server to play via a web browser.
- Configure the web server port using command-line arguments.
Simply run the game without any flags to start playing in the terminal:
$ ./word-scramble
The game will display a scrambled word, and you'll have three chances to guess the correct word.
To start the web server, use the -web
flag:
$ ./word-scramble -web
By default, the server runs on port 8080
. You can specify a custom port using the -port
flag:
$ ./word-scramble -web -port 9090
Then, visit http://localhost:9090 to play.
-web
: Starts the web server for the game.-port <number>
: Specifies the port for the web server.
- The game displays a scrambled word:
elppa
- You guess:
apple
- If correct, the game congratulates you. If incorrect, you have up to 3 attempts.
- Open the web page.
- Enter your guesses in the provided input box.
- Get instant feedback on your guesses.
Make sure you have Go installed on your system. Build the game with:
go build -o word-scramble
Alternatively, you can download the pre-built packages from the GitHub Releases page.
If you want to contribute or modify the code:
- Clone the repository.
- Make changes and test them.
- Submit a pull request if you're contributing.
This project is open-source and available under the MIT License.
Enjoy the game and happy scrambling!