Install Go by following the instructions at https://go.dev/doc/install .
Note that on macOS you can install Go using Homebrew.
Add the dependencies by running
go mod tidy
Run the game by running
go run .
go test
From https://ebitengine.org/en/documents/webassembly.html
env GOOS=js GOARCH=wasm go build -o ./build/raw/smcd-go-labyrinth.wasm ./
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ./build/raw/
cp ./index.html ./build/raw/index.html
zip -r9 ./build/smcd-go-labyrinth.zip ./build/raw
This requires either npm serve or a build in server like those offered by JetBrains tooling.
If you want to install a local http server use the following commands:
npm install --global serve
serve ./build/raw
Open the shown localhost link. (default port 3000 will switch to different open port if occupied)