Skip to content

Kruutteri1/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe Game with Minimax AI

Description: The TicTacToe program is a Java implementation of the classic Tic-Tac-Toe game with two game modes: 2 players on the same computer and a player versus an AI bot. The AI bot is implemented using the Minimax algorithm, which allows it to make intelligent decisions and provide a challenging opponent.

Features:

  1. Two Game Modes: The program offers two game modes. In the first mode, two players can play against each other on the same computer. In the second mode, the player can test their skills against an AI bot.
  2. Minimax AI Bot: The AI bot in the second game mode uses the Minimax algorithm to make optimal moves. It evaluates the game state and considers all possible moves to choose the best one.
  3. Interactive Interface: The program provides a graphical user interface (GUI) using Java's Swing library. Players can click on the game board to make their moves and view the game's progress visually.
  4. Win and Draw Detection: The program detects winning moves and displays the winner accordingly. It also identifies a draw when the game board is fully occupied without a clear winner.
  5. New Game Option: After a game is finished, players can start a new game with a single click, resetting the game board and allowing them to play again.