A simple desktop Tic‑Tac‑Toe (X/O) game with a clean Swing GUI. You can play Human vs Human, Human vs Robot, Robot vs Human, or Robot vs Robot. The app provides a menu to select player modes, a start/reset button, and a status label indicating the game state.
- 3×3 board with clickable cells
- Player modes selectable from the Game menu:
- Human vs Human
- Human vs Robot
- Robot vs Human
- Robot vs Robot
- Start/Reset button to begin or restart a round
- Status label showing current player and outcomes (win/draw)
- Exit option in the menu
- Java (configured via Gradle toolchains)
- Java Swing and AWT for the GUI playerOptionMove
/src/tictactoe
— main source code (Swing UI and game logic)ApplicationRunner.java
— entry point (launches the Swing app)TicTacToe.java
— main window (frame, menus, and layout)Board.java
,ButtonStartReset.java
,ButtonPlayer.java
,StatusLabel.java
,Player.java
,PlayerOption.java
,Status.java
Option A — from an IDE :
- Open the project in IntelliJ IDEA (or any Java IDE).
- Locate
/src/tictactoe/ApplicationRunner.java
. - Run the
main
method. The Tic‑Tac‑Toe window should appear.
- The UI is built with standard Swing components; no external GUI libraries are required.
- Player “Robot” is a simple automated opponent implemented within the project logic that selects a random empty cell.