Tetris implemented in rust and exported as wasm! Currently has most of the basic functionality you can expect from Tetris, bugs included!
A live demo can be found here!
You will need wasm-pack and npm Project is built mainly in windows, but it works on linux too!
- clone the repository i.e ssh:
git clone [email protected]:Avokadoen/tetris_wasm.git
- navigate to project root
cd ./tetris-wasm
- run wasm-pack
wasm-pack build
- navigate to ./www from root
cd ./www
- install dependencies through npm
npm install
- run npm to host local server (make sure you are not hosting anything on 8080, or change port)
npm run start (to change port: -- --port 8008)
- go to localhost:8080 in your favourite browser 🎉
Thanks to leudz for fixing my ugly c-style loops and recommending some lint tools. See #17