A 1vs1 Tic-Tac-Toe game developed with Node.js and Express.js. This is a web-based implementation of the classic Tic-Tac-Toe game where two players can take turns marking X and O on a 3x3 grid.
- Interactive 3x3 game board
- Turn-based gameplay (X goes first, then O)
- Score tracking for both players
- Visual feedback for the current player's turn
- Win detection for rows, columns, and diagonals
- Game reset functionality
- Responsive design with SCSS styling
- Colorblind friendly color scheme
- Backend: Node.js, Express.js
- Frontend: HTML5, CSS3 (SCSS), Vanilla JavaScript
- Build Tools: express-dart-sass for SCSS compilation
- Development: Nodemon for auto-reloading during development
-
Clone the repository:
git clone https://github.com/yourusername/tic-tac-toe-node-js.git cd tic-tac-toe-node-js
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
For production:
npm start
-
Open your browser and navigate to:
http://localhost:3000
-
Play the game:
- Players take turns clicking on the grid cells
- X goes first, followed by O
- The game announces the winner when a player gets three in a row
- Use the "Reset Game" button to start a new game
index.js
- Main server filepublic/
- Static assets (CSS, JS, images)src/scss/
- SCSS source filesviews/
- HTML templates