Skip to content

This is a Tic Tac Toe game implemented in C++ using SDL 1.2 for graphics and CMake with Ninja as the build system

License

Notifications You must be signed in to change notification settings

ZouariOmar/Tic-Tac-Toe

Repository files navigation

Tic Tac Toe Game

Tic Tac Toe Tic Tac Toe

Overview

This is a Tic Tac Toe game implemented in C++ using SDL 1.2 for graphics and CMake with Ninja as the build system. The game allows the player to compete against the computer on a 3x3 grid, aiming to align three of their marks (Kayori or Enemy) horizontally, vertically, or diagonally.

Used tech

Linux Git GitHub C CMake SDL1.2

Features

  • player-computer gamePlay (Player X and Player O)
  • User-friendly graphical interface powered by SDL
  • Input validation to ensure valid moves
  • Restart option to play multiple rounds

Prerequisites

Before running the game, ensure you have the following installed:

  • C compiler (e.g., gcc)
  • CMake (version 3.0 or higher)
  • Ninja build system
  • SDL 1.2 library

Project Structure

.tic-tac-toe
├── bin
│   ├── build
│   │   └── CMakeFiles
│   │       ├── 3.30.3
│   │       │   ├── CompilerIdC
│   │       │   │   └── tmp
│   │       │   └── CompilerIdCXX
│   │       │       └── tmp
│   │       ├── app.dir
│   │       └── pkgRedirects
│   ├── debug
│   ├── release
│   └── test
├── doc
│   └── pdf
├── pkg
└── project
    ├── doc
    ├── inc
    ├── models
    ├── res
    └── src

32 directories

Installation

  1. Clone the repository:

    git clone https://github.com/ZouariOmar/tic-tac-toe
    cd tic-tac-toe
  2. Run the game

    chmod +x run.sh
    ./run.sh ninja

Contributing

Contributions are welcome! If you have suggestions for improvements or features, feel free to fork the repository and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • SDL for the graphics library.
  • Thanks to everyone who contributed to the development of this game!

About

This is a Tic Tac Toe game implemented in C++ using SDL 1.2 for graphics and CMake with Ninja as the build system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published