Skip to content

loopholend/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

🎮 Advanced TicTacToe Championship Game

A feature-rich Java TicTacToe game with AI opponent, tournament mode, multiple themes, sound effects, and comprehensive statistics tracking.

Java AWT/Swing

Features

Core Gameplay

  • Classic 3x3 TicTacToe with responsive design
  • Real-time game status and turn indicators
  • 5 beautiful themes (Classic, Dark, Ocean, Sunset, Forest)

AI Computer Opponent

  • 4 difficulty levels: Easy, Medium, Hard, Expert
  • Minimax algorithm implementation for Expert mode
  • Strategic gameplay with natural timing

Tournament System

  • Competition mode with customizable rounds (1-10)
  • Complete championship tracking and statistics
  • Round-by-round results with final winner determination

Smart Features

  • AI-powered hint system with optimal move suggestions
  • Complete move history and game recording
  • Player statistics tracking (wins, streaks, play time)
  • Game export functionality with timestamped files

Audio & Visual

  • Sound effects for moves, wins, and draws
  • Button animations and visual feedback
  • Theme-based colors and winning highlights

Installation - NONE

Prerequisites

  • Java 8 or higher
  • Java Development Kit (JDK)

Running the Game

  1. Clone/Download the repository
  2. Compile: javac tictaktoe2.java
  3. Run: java TicTacToe

How to Play

  1. Enter player names (must contain at least one letter)
  2. Optional: Enable "VS Computer" and select AI difficulty
  3. Optional: Enable "Competition Mode" and set number of rounds
  4. Click "START GAME" and take turns clicking the 3x3 grid
  5. First to get 3 in a row wins!

Controls

  • HINT - Get AI-suggested optimal move
  • LEAVE - Return to setup screen
  • SOUND ON/OFF - Toggle audio effects
  • THEME - Cycle through visual themes
  • STATS - View player statistics
  • SAVE GAME - Export game record to file

Technical Features

  • Object-oriented design with clean architecture
  • Event-driven programming with comprehensive interaction handling
  • Dynamic UI management with real-time component resizing
  • File I/O operations for game saving and statistics
  • Minimax algorithm for optimal AI decision-making

Educational Value

Perfect for learning Java GUI development, AI algorithms, game development patterns, and object-oriented programming concepts.

About

Advanced Java TicTacToe with AI opponent (4 difficulty levels), tournament mode, multiple themes, sound effects, move tracking, player statistics, hint system, and game export functionality.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages