https://github.com/guliveer/tic-tac-toe
This project is a simple implementation of the classic game "Tic-Tac-Toe" written both in Java and Swift.
https://github.com/guliveer/tic-tac-toe
Last synced: 3 months ago
JSON representation
This project is a simple implementation of the classic game "Tic-Tac-Toe" written both in Java and Swift.
- Host: GitHub
- URL: https://github.com/guliveer/tic-tac-toe
- Owner: Guliveer
- License: gpl-3.0
- Created: 2024-11-19T18:11:02.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-21T22:33:35.000Z (7 months ago)
- Last Synced: 2024-11-21T23:25:22.624Z (7 months ago)
- Language: Java
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


# Tic-Tac-Toe đšī¸
**Tic-Tac-Toe** is a simple implementation of the classic game "Tic-Tac-Toe" (also known as Noughts and Crosses) written in both **Java** (with graphical interface) and **Swift** (with text-based interface). It allows two players to take turns marking spaces on a 3x3 grid, aiming to get three of their marks in a row, column, or diagonal.
The project includes two versions:
- **Java_Tic-Tac-Toe**: A graphical game built using Java Swing.
- **Swift_Tic-Tac-Toe**: A text-based game built using Swift for the terminal.## ⨠Features
- **Classic Tic-Tac-Toe gameplay**: Play as "X" or "O".
- **Graphical interface (Java version)**: Beautiful UI with buttons for each grid cell.
- **Text-based interface (Swift version)**: Terminal-based gameplay.
- **Win detection**: The game detects when a player wins or when the game results in a draw.
- **Restart option**: After a win or draw, the game can be restarted.## đ How to Run
1. **Clone the repository**:
Clone the repository to your local machine:```bash
git clone https://github.com/Guliveer/Tic-Tac-Toe.git
```### For _Java_:
2. **Set up the project:**
Ensure that you have Java Development Kit (JDK) installed. You can use any IDE like IntelliJ IDEA, Eclipse, or run the project via terminal.3. **Run the app:**
In your IDE or terminal, compile and run the `TicTacToe.java` file to start playing.### For _Swift_:
2. **Set up the project:**
Ensure that you have Xcode installed, along with Swift development tools. Open the project in Xcode.3. **Run the app:**
Once the project is open in Xcode, press `Cmd + R` to build and run the app.## đĨī¸ Technologies
- **Java**: Using the Swing framework, the Java version provides a simple, classic desktop application for playing Tic-Tac-Toe.
- **Swift**: The Swift version uses a text-based interface to provide a console game experience.## đˇ Screenshots
| Java Version | Swift Version |
| :---------------------------------: | :-----------------------------------: |
|  |  |## đ¤ Contributing
If you'd like to contribute to this project, feel free to fork it and submit a pull request. Any improvements or new features are always welcome!
---
Created with â¤ī¸ by [Oliwer Pawelski](https://github.com/Guliveer)