├── go.mod ├── README.md ├── .gitignore ├── Makefile ├── index.html ├── index.js ├── main.go ├── LICENSE └── pako.min.js /go.mod: -------------------------------------------------------------------------------- 1 | module frigidriver.com/twistylittlepassages 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wasm-maze-generator 2 | A simple WASM maze generator in Go. 3 | 4 | There's a [live demo](http://frigidriver.com/mazes). 5 | 6 | Build with 7 | 8 | GOOS=js GOARCH=wasm go build 9 | gzip twistylittlepassages 10 | 11 | Upload `*.{gz,html,js}` somewhere. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: wasm_exec.js twistylittlepassages.gz 2 | 3 | wasm_exec.js: twistylittlepassages 4 | cp "$$(go env GOROOT)/misc/wasm/wasm_exec.js" $@ 5 | 6 | twistylittlepassages: main.go 7 | GOOS=js GOARCH=wasm go build . 8 | 9 | twistylittlepassages.gz: twistylittlepassages 10 | gzip -9 $< 11 | 12 | clean: 13 | go clean 14 | rm -f wasm_exec.js twistylittlepassages twistylittlepassages.gz 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |0&&(0===t||1!==p))return-1;for(Z[1]=0,w=1;w