Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.29 KB

README.md

File metadata and controls

33 lines (21 loc) · 1.29 KB

AI Tic-Tac-Toe

AI Tic-Tac-Toe is a Java-based implementation of the classic Tic-Tac-Toe game, featuring both single-player mode against an AI opponent and multiplayer mode. The AI uses the Minimax algorithm to provide a challenging gameplay experience.

Features

  • Single-Player Mode: Play against an AI opponent that uses the Minimax algorithm for strategic moves.
  • Multiplayer Mode: Challenge a friend in a two-player game.
  • Intuitive GUI: Simple and user-friendly interface built with Java Swing.
  • Dynamic Gameplay: Real-time updates and game state management.

Installation

  1. Clone the Repository:

  2. Navigate to the Project Directory:

  3. Compile the Java Files:

  4. Run the Application:

Usage

  1. Launch the application to select the game mode (Single-Player or Multiplayer).
  2. In Single-Player mode, the AI will make moves based on the Minimax algorithm.
  3. In Multiplayer mode, two players can alternate turns using the interface.
  4. The game will notify players of the result (win, loss, or tie) and offer to restart.

Algorithms

  • Minimax Algorithm: Employed in Single-Player mode to determine the optimal move for the AI.

Contributing

Feel free to submit issues or pull requests. Contributions to improve the game or add new features are welcome!