An open API service indexing awesome lists of open source software.

https://github.com/samyam81/tictactoe

This repository hosts Java implementations of Tic-Tac-Toe: a graphical version using Swing and a console version.
https://github.com/samyam81/tictactoe

console console-game java swing

Last synced: 9 months ago
JSON representation

This repository hosts Java implementations of Tic-Tac-Toe: a graphical version using Swing and a console version.

Awesome Lists containing this project

README

          

# TicTacToe

This repository contains two implementations of the classic game Tic-Tac-Toe: one implemented using Java Swing for a graphical user interface (GUI), and the other implemented as a console-based application.

## GUI Version

### Files
- **MainGUI.java**: Contains the code for the GUI version of Tic-Tac-Toe implemented using Java Swing.

### How to Play
1. Run the `MainGUI.java` file.
2. A window will open displaying the Tic-Tac-Toe board.
3. Click on any square to make a move.
4. The game alternates between 'X' and 'O' players.
5. The game will announce the winner or declare a draw.

## Console Version

### Files
- **mainApp.java**: Contains the code for the console version of Tic-Tac-Toe.

### How to Play
1. Run the `mainApp.java` file.
2. The game will prompt you to enter the row and column numbers where you want to make a move.
3. Enter the row and column numbers when prompted.
4. The game will announce the winner or declare a draw.

Enjoy playing Tic-Tac-Toe!