Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
11 lines
1.1 KiB
Plaintext
11 lines
1.1 KiB
Plaintext
Build a complete tic-tac-toe game as a single self-contained file named index.html in the current directory, using Three.js (WebGL) for all rendering. A vendored build of Three.js is already in this directory as three.module.min.js; import it with a relative path and do not load anything from the network.
|
|
|
|
Requirements:
|
|
- A 3x3 board drawn in 3D with a visible WebGL canvas that fills the page; X and O are distinct 3D meshes; use real mouse clicks on the canvas (raycasting) to place marks. Two players alternate, X first.
|
|
- Detect a win (rows, columns, diagonals) and a draw. Show the status ("X's turn", "O wins", "Draw") in an element with id="status".
|
|
- After a win or a draw, further clicks on the board must not place marks.
|
|
- A button with id="restart" resets the board to empty and X to move.
|
|
- The page must load without any JavaScript error.
|
|
|
|
Verify your work before finishing: serve or open the file, and write and run a small automated check (for example with Node or Python) if the tools are available. When you are done, reply with a short summary of what you built and how you verified it.
|