diff --git a/README.md b/README.md index 116f5be..83043ea 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,144 @@ # ToeTactic -Tic Tac Toe if it was good?! + +ToeTactic is a retro-styled misère Tic-Tac-Toe variant where _making a line means you lose_. The single-page app lives entirely in `index.html` and ships with: + +- Local multiplayer for 2–4 players with custom emoji pieces. +- Bot battles with four AI difficulties, including an “impossible” minimax solver. +- Theme switcher (Vista, Windows 98, Mac OS Aqua) plus dark-mode support. +- Full-screen effects (dynamic shadows, particles, confetti, ripple cursor) and adaptive music. + +## Running Locally + +1. Serve the repo root with any static HTTP server (`python3 -m http.server` works). +2. Open `http://localhost:8000/index.html` in a modern browser (desktop recommended). +3. Allow audio playback in the browser if prompted (autoplay is needed for menu music). + +_No build tooling is required; the experience is 100% client-side._ + +## UI, Components, and Game Flow + +- **Main Window (`.window`)** – Vista/Win98/Aqua-themed frame that hosts every view. +- **Menu (`#menu`)** – Entry point with `Play With Bot`, `Play Local`, `How To Play`, and `Settings`. +- **Settings (`#settingsMenu`)** – Controls grid size (3–10), AI difficulty, per-player emojis, player count, theme, and audio sliders. +- **Board Container (`#boardContainer`)** – Visible during a match; includes the turn indicator, player queue, board grid, calculation terminal, and minimal game menu. +- **Instructions Panel (`#instructions`)** – Animated walkthrough shown from the menu. +- **Modal (`#gameModal`)** – Shared overlay used for win/lose/draw states with “Play Again” and “Main Menu” actions. +- **Audio Elements** – Injected dynamically (`titleMusic`, `botMusic`, `localMusic`) and controlled through the master/music volume sliders and toolbar toggle. + +Flow overview: + +1. **Menu → Settings** (optional) – configure players, theme, and audio. +2. **Menu → Play With Bot / Play Local** – `startGame()` builds the board, player queue, and music context. +3. **Gameplay** – `makeMove()` enforces turns, checks for losing lines via `checkLose()`, and drives the bot via `botMove()`. +4. **Game End** – `showGameModal()` announces the loser/winner/draw and allows replay or returning to the menu. + +## Public API & Function Reference + +Every function below is declared in the `