Skip to content

Iqbolshoh/javascript-xo-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ JavaScript XO Game

JavaScript XO Game is a Tic-Tac-Toe game built with vanilla HTML, CSS, and JavaScript. You play as X against a computer opponent (O) on a 3x3 grid โ€” the computer blocks your winning moves, takes its own winning moves when available, and otherwise plays the center or a random open cell.

JavaScript License

๐Ÿ“š Table of Contents

๐Ÿš€ Features

  • โœ… Responsive Design โ€“ The game board adapts to all screen sizes.
  • ๐ŸŽฎ Player vs Computer โ€“ You play X, the computer plays O with basic blocking/winning logic.
  • ๐Ÿ† Winner Highlight โ€“ The winning combination is highlighted in green with a scale animation.
  • ๐Ÿค Draw Detection โ€“ Displays a message when the board fills up with no winner.
  • ๐Ÿ”„ Play Again Button โ€“ Appears at game end to instantly reset the board.

๐Ÿ‘€ Screenshots

Desktop Desktop Preview

Mobile Mobile Preview

๐Ÿ› ๏ธ Installation

1๏ธโƒฃ Clone the repository

git clone https://github.com/Iqbolshoh/javascript-xo-game.git
cd javascript-xo-game

2๏ธโƒฃ Open index.html

Simply open the index.html file in any modern web browser to start playing โ€” no build step or server required.

๐Ÿ“‚ Project Structure

javascript-xo-game/
โ”œโ”€โ”€ index.html               # Game markup
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ css/style.css        # Board styling and animations
โ”‚   โ”œโ”€โ”€ js/script.js         # Game logic + simple computer opponent
โ”‚   โ””โ”€โ”€ images/              # Preview screenshots
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ README.md

๐Ÿ–ฅ Technologies Used

HTML CSS JavaScript

๐Ÿ“œ License

This project is open-source and available under the MIT License.

๐Ÿค Contributing

๐ŸŽฏ Contributions are welcome! If you have suggestions or want to enhance the project, feel free to fork the repository and submit a pull request.

๐Ÿ“ฌ Connect with Me

๐Ÿ’ฌ I love meeting new people and discussing tech, business, and creative ideas. Let's connect! You can reach me on these platforms:

Website Gmail GitHub LinkedIn Telegram WhatsApp Instagram X YouTube

About

๐ŸŽฎ Tic-Tac-Toe (XO) โ€” A classic game built with HTML ๐ŸŒ, CSS ๐ŸŽจ, and JavaScript โš™๏ธ. โœจ Features: ๐Ÿงฉ Responsive board ๐Ÿ–ฑ๏ธ Interactive gameplay ๐Ÿ† Win detection ๐Ÿ” Restart option

Topics

Resources

License

Stars

21 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors