This project is a simple Tic-Tac-Toe game written in Go and compiled to WebAssembly (Wasm). The game demonstrates basic DOM manipulation and event handling using the syscall/js package in Go.
main.go: The Go source code that compiles to WebAssembly.index.html: The HTML file that loads the WebAssembly module and includes the game UI.wasm_exec.js: The JavaScript support file required to run Go WebAssembly.- To get this file, you can run this command:
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .
- To get this file, you can run this command:
- Go 1.11+ (WebAssembly support)
git clone https://github.com/RezaKargar/tic-toc-toe-go-wasm.git
cd tic-toc-toe-go-wasmGOOS=js GOARCH=wasm go build -o main.wasm main.go