How shantaveerkhyalap/tic-tac-toe works
This is a browser-based tic-tac-toe game served by a small Express server. A player selects squares; client-side code alternates turns, checks for wins or draws, displays the result, and supports resetting or starting a new game. The server serves the page and static assets. The HTML and CSS appear in the tree but were not excerpted, so their internal wiring to the client script is not asserted.
Main entry points: script.js Board interaction · server.js Express server · index.html Game page · style.css Game styling
Components 7
Web server
- Express server
server.js
Browser experience
- Game page
public/index.html - Game styling
public/style.css
Game logic
- Board interaction
public/script.js - Win and draw checks
public/script.js - Reset controls
public/script.js
Other components
- Player
Connections 7
- Player → Board interaction: plays
public/script.js - Board interaction → Win and draw checks: checks outcome
public/script.js - Win and draw checks → Board interaction: updates display
public/script.js - Reset controls → Board interaction: resets game
public/script.js - Express server → Game page: serves page
server.js - Express server → Game styling: serves static files
server.js - Express server → Board interaction: serves static files
server.js