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.
- Host: GitHub
- URL: https://github.com/samyam81/tictactoe
- Owner: samyam81
- Created: 2024-02-05T07:49:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T07:07:02.000Z (about 2 years ago)
- Last Synced: 2025-03-22T09:24:49.742Z (about 1 year ago)
- Topics: console, console-game, java, swing
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!