mastermind-wasm
Try it live on my github.io page!
How to play:
It's guaranteed to guess your code within 5 guesses.
As a start, I implemented this algorithm with a naive approach in JavaScript and it was far too slow to be playable, taking several seconds between guesses.
I really enjoy using Rust, and since it has built-in support for compiling to WebAssembly and a mature ecosystem of libraries and utilities designed for WebAssembly, I figured I would implement the performance-sensitive parts in Rust.
wasm-pack build
cargo test
cd webpack
npm install
npm run dev