Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
29 lines
2.3 KiB
Markdown
29 lines
2.3 KiB
Markdown
---
|
|
id: ttt
|
|
title: Three.js tic-tac-toe in one file
|
|
kind: create
|
|
expected_rounds: 15-60
|
|
---
|
|
# Three.js tic-tac-toe in one file
|
|
|
|
Existing task of docs/e2e-run.md (jobs 943*), prompt text unchanged from `scripts/e2e/codex/prompt-threejs.txt` (sha256 f57248412f69b4a6a76aab00c2ff33ee3ce676849768f847d412c7e9e9d8a074 of the file; the file ends with a newline that `$(cat file)` stripped, the extracted prompt is the same string).
|
|
The vendored three.module.min.js is an external seed file (third-party, not in Git).
|
|
Acceptance on the server is STATIC (`accept.py`: file present, imports the vendored module by a relative path, no network URL, WebGL renderer, raycaster, #status, #restart, win/draw logic, click handler, and the page's script is syntactically plausible). The six real-mouse browser checks of `scripts/e2e/codex/check_ttt.mjs` need Node + Playwright, which the server does not have; they run afterwards on a machine that has them over the stored workspaces (`delta/browser_check_ttt.sh`) and are reported separately.
|
|
|
|
## Prompt
|
|
<!-- PROMPT BEGIN -->
|
|
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.
|
|
<!-- PROMPT END -->
|
|
|
|
## External seed files
|
|
three.module.min.js 08fd7545d13d2c7fb65ab691530a802dafefd638596501854f267d0fb13c39e7 691648
|