From c4d707b5addfddf5389d2041a9b895ed3ea25630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jirc=C4=83?= Date: Sun, 27 Sep 2026 18:17:19 +0300 Subject: [PATCH] docs: make README consistent with implementation (#1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The README described two behaviors that don't match the actual code. This PR corrects both so the docs are accurate. ## Changes - **CPU mode**: README claimed a *minimax* AI, but `public/game.js` (`cpuMove`) picks a random empty cell. Updated to say *random AI*. - **SQLite**: README said `sql.js` runs *in-memory*, but `server/db.js` persists to a file (`server/data/games.db`). Updated to say *file-based persistence*. No code changes — documentation only. --------- Co-authored-by: robi Reviewed-on: https://git.alecsa.design/daniel-jirca/ttt/pulls/1 Reviewed-by: robi --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b146c6..c1bc758 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Tic Tac Toe -A tic-tac-toe game with two modes: **CPU** (play against a minimax AI) and **Online** (real-time 2-player over WebSocket). +A tic-tac-toe game with two modes: **CPU** (play against a CPU opponent that makes random moves) and **Online** (real-time 2-player over WebSocket). ## Stack - Frontend: vanilla JS + CSS (no build step) -- Backend: Node.js + Express (serves static files) + `ws` (WebSocket) + `sql.js` (SQLite, in-memory) +- Backend: Node.js + Express (serves static files) + `ws` (WebSocket) + `sql.js` (SQLite, file-based persistence) ## Project layout ```