A simple number guessing game built using Rust and WebAssembly (WASM).
In this game, the computer generates a random number between 1 and 100. The player's task is to guess this number. The game provides feedback on whether the player's guess is too low, too high, or correct.
Before you start, ensure you have the following installed:
- Rust and Cargo
- wasm-pack:
cargo install wasm-pack
- Node.js (Optional for the http-server utility)
- http-server:
npm install -g http-server
- http-server:
To get the project up and running on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/AScriver/WASM-Guessing-Game.git wasm_guessing_game
- Navigate to the project directory:
cd wasm_guessing_game
- Build the WASM module:
wasm-pack build --release --target web
- Serve the project locally: Navigate to the root directory of your project and start the server with CORS enabled:
http-server . -p 8000 --cors
- Access the game:
Open a web browser and navigate to
http://localhost:8000
to play the game.