Skip to content

RezaGooner/Tic-Tac-Toe-SFML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

48c7643 · Jan 24, 2025

History

8 Commits
Jan 24, 2025
Jan 24, 2025

Repository files navigation

Tic-Tac-Toe with SFML

This project is a Tic-Tac-Toe game built using the SFML library.

Features

  • Visually appealing design using SFML
  • Supports two-player mode (Player vs Player)
  • Clean and structured code

Prerequisites

To run this project, you need the following:

  • C++ Compiler (e.g., g++, clang++)
  • SFML 2.5.1 library

How to Run

1. Clone the Repository

First, clone the repository:

git clone https://github.com/RezaGooner/Tic-Tac-Toe-SFML.git
cd Tic-Tac-Toe-SFML

2. Compile the Project

If SFML is installed on your system, you can compile the code as follows:

g++ -o TicTacToe main.cpp -lsfml-graphics -lsfml-window -lsfml-system

3. Run the Game

After compiling, run the game with the following command:

./TicTacToe

Project Structure

Tic-Tac-Toe-SFML

├── main.cpp # Contains the main game logic

├── CMakeLists.txt # Define path of SFML library and linkers

├── assets/ # Directory for game assets

│ ├── arial.ttf # Default font

├── include/ # Header files

│ ├── config.h # Define constant values ​​and settings

└── cmake-build-debug/ # Directory for compiled binaries and necessary DLLs