- Introduction
- Description
This project is a classic implementation of the Tic-Tac-Toe game, combining C++ and Python to create an interactive gaming experience. The logical part of the game is handled by a C++ program (main.cpp). The graphical interface is developed using Python's Pygame library (graphics.py), providing a visually appealing and user-friendly way to play the game.
- C++ File
- Python File
- How to execute the code?
Concepts used :
- Classes and Objects
- File Handling - to create a file called gamestate.txt that is further used by the python file for the graphics
- Game Logic - includes taking input from the user and implementing various conditions where a player can be the winner
- Command Line Interfacing - executing the python file simultaneously
Concepts used :
- pygame - for creating the game graphics and event handling
- File handling - for reading the file and using suitable logic to make the design
- Image Layering - for giving the impression the game is being played in real-time
steps :
- clone the repository
- open the game directory
- compile main.cpp using g++ -std=c++11 -o tictactoe main.cpp
- run the command python3 graphics.py to keep the file running
- execute the executable file created using ./tictactoe
- for Windows - tictactoe.exe