Skip to content

A two-player game in which the objective is to take turns and mark the correct spaces in a 3x3 (or larger) grid.

License

Notifications You must be signed in to change notification settings

Aeronaul/Tictactoe_Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-tac-toe (Java)

A Java desktop application for playing the classic game of Tic-Tac-Toe. The application allows you to play against the computer, against another human player, or even watch the computer play against itself. It is built using Java Swing with JDK 17.

Screenshot

Tic-tac-toe screenshot

Features

  • Play against the computer: Challenge the computer and test your Tic-Tac-Toe skills.
  • Play against another human player: Enjoy the game with a friend or family member.
  • Watch the computer play against itself: Observe the computer playing both X and O positions.
  • Easy-to-use graphical interface: The game board and controls are displayed using Java Swing components.

Getting Started

To get a local copy of the project up and running on your machine, follow these steps:

Prerequisites

  • Java Development Kit (JDK) 17 or higher
  • Git

Build & Run

  1. Clone the repository:
git clone https://github.com/Aeronaul/Tictactoe_Java.git
cd Tictactoe_Java/src
  1. Compile the Java source files:
javac tictactoe/*.java
  1. Run the application:
java tictactoe.ApplicationRunner

Usage

  • Launch the application by running the TicTacToe class.
  • Choose the game mode: "Player vs. Computer," "Player vs. Player," or "Computer vs. Computer."
  • Click on the empty cells of the game board to make your moves.
  • The game will indicate the winner or a draw when the game ends.
  • To start a new game, click on the "Reset/Start" button.

Acknowledgements

The Java programming language and Java Swing library.

Contact

For any questions or inquiries, please contact me at: [email protected].

About

A two-player game in which the objective is to take turns and mark the correct spaces in a 3x3 (or larger) grid.

Topics

Resources

License

Stars

Watchers

Forks

Languages