This is my first project in Rust, the client for a networked implementation of the popular whiteboard game Hangman. I wrote it at the end of my sophomore year of college as an add-on to the final project for my Programming Languages class.
Note: This project requires my hangman-server-rust repository to work! There is more information about setting up the server in that repository.
tested on linux, but it should mostly work for other OSes too
- Before setting up the client, ensure that you have either installed the hangman server or have the IP address of a server to connect to
- Open a terminal and navigate to an appropriate directory (such as your Downloads)
- Clone this repo with
git clone https://github.com/Jovan-04/hangman-client-rust.git - Run
cd hangman-server-rustto navigate to the project's root directory - By default, the client connects to
127.0.0.1:25565; you can change that by editing theIP_ADDRESSstring insrc/main.rs:10
- You can also build this to a binary executable for your OS using
cargo build. The output file will be./target/debug/client.
- Run the project's source code by navigating to its root directory and running
cargo runin the terminal - If you instead have a binary executable (likely named
client), you can run it directly with./clientfrom the file's directory - Upon running the project, you'll get ASCII art of the game board, which will update as you make guesses
- You can submit a guess for a single letter or the entire word; you have up to 6 incorrect guesses before you lose
- Have fun!