A modern implementation of "Dots and Boxes" featuring a C++ Core Engine compiled to WebAssembly.
- Core Engine: C++23 (Domain Driven Design) located in
core/. - Frontend: Vanilla JS + HTML5 + CSS3 located in
web/. - Integration: Emscripten (WebAssembly) via
core/src/bindings/.
The easiest way to run the game is using Docker Compose. This handles both Building (C++ → Wasm) and Serving.
- Docker Desktop or Docker Engine.
docker-compose up- Build: The
buildercontainer will compile the C++ code toweb/js/dotdot_core.wasm. - Serve: The
servercontainer will start Nginx. - Play: Open http://localhost:8080.
To rebuild the C++ code after making changes, simply run docker-compose up --build or just docker-compose up again (since the builder runs on startup).
If you prefer not to use Docker:
- Emscripten SDK:
brew install emscripten - Python 3: For serving.
- Build Wasm:
./build_wasm.sh
- Serve:
python3 -m http.server
- Play: Open
http://localhost:8000/web/.
The project includes GoogleTest unit tests for the core engine.
./build_and_test.sh