Skip to content

byluisfer/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe 🎲

Welcome to Tic-Tac-Toe! This is a classic game implemented in HTML, CSS, and JavaScript, where you can play against another player or an AI.

🚀 Features

  • Player vs Player: Play against a friend on the same device.
  • Player vs AI: Challenge the computer.
  • Active Turn Indicator: Clearly shows which player's turn it is.
  • Restart Game: Start a new game at any time.
  • Main Menu: Easy access to choose the game mode.

🛠️ Technologies Used

  • HTML: Structure of the game.
  • CSS: Styles and animations.
  • JavaScript: Game logic and user interface control.

🎮 How to Play

  1. Player vs Player: Select "Player vs Player" to play against a friend.
  2. Player vs AI: Select "Player vs AI" to play against the computer.
  3. Click on any empty cell to place your symbol (X or O).
  4. The first player to align three symbols in a row, column, or diagonal wins!
  5. When the game is over, you can select "New Game" to start again or "Back to Menu" to return to the main menu.

🧩 Game Logic

  • The game automatically checks the state after each move to determine if there is a winner or if the game ended in a draw.
  • When playing against the AI, it makes random moves in the available cells.

📂 Project Structure

  • index.html: Main structure of the page.
  • style.css: Styles and animations for the game.
  • script.js: Game logic and interface control.

🖥️ Installation and Usage

  1. Download or Clone the Repository:
    git clone https://github.com/A5TUT0/Tic-Tac-Toe.git
  2. Open the index.html file in your favorite web browser.

Hope you enjoy playing as much as I enjoyed creating it! 🎉 Created by Luis Fernández.

About

Meine tic-tac-toe spiel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published