A visually polished, responsive Tic-Tac-Toe game built using HTML, CSS, and JavaScript. Now featuring a complete browser-based UI with support for both Player vs Player and Player vs Bot gameplay modes — no console required!
- Clone this repository:
git clone https://github.com/singharyan006/tic-tac-toe.git
- Open index.html in your browser — you're ready to play!
⚠️ The console-based versions (v1.x) are still available in previous releases.
- Player vs Player gameplay
- Player vs Computer (Bot) gameplay
- Win and draw detection logic
- Responsive and animated UI
- Random move generation for bot
- Clean architecture using factory functions and module pattern (IIFE)
- Modular, reusable code with minimal global scope usage
-
👤 Player vs Player
Two players take turns by clicking on the board to make their move. -
🤖 Player vs Computer (Bot)
You play as X, and the bot (O) picks a random empty cell after your move.
Version | Description |
---|---|
v2.0-ui |
First interactive UI version with PvP and Bot modes |
v1.1-console |
Console version with Bot support |
v1.0-console |
Initial PvP-only console version |
Tic-Tac-Toe/
├── assets/ # Images and UI assets
│ ├── preview1.png
│ ├── preview2.png
│ ├── favicon.png
│ ├── man.png
│ └── robot.png
├── console-version/ # Console-based version
│ └── game.js
├── index.html # UI entry point
├── style.css # UI styling
├── script.js # UI logic
└── README.md
- HTML5
- CSS3 (Flexbox, Responsive Design)
- JavaScript (ES6+)
- Vanilla JS (no frameworks)
- Factory Functions
- IIFE (Module Pattern)
- Git & GitHub for versioning
v2.0-ui
v1.1-console
v1.0-console
Aryan Singh
Bringing you a clean, interactive Tic-Tac-Toe experience — from terminal to touch ✨