Skip to content

Latest commit

 

History

History
50 lines (47 loc) · 1.91 KB

README.md

File metadata and controls

50 lines (47 loc) · 1.91 KB

Tic-Tac-Toe

Table of Contents

  • Introduction
  • Description

Introduction

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.

image

Description

  1. C++ File
  2. Python File
  3. How to execute the code?

C++ File


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

Python File


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

How to execute the code?

Demonstration link : https://drive.google.com/file/d/1wnrguGIX9qV5XZoSQGtxLEzW9WoCNLfh/view?usp=sharing
steps :
  1. clone the repository
  2. open the game directory
  3. compile main.cpp using g++ -std=c++11 -o tictactoe main.cpp
  4. run the command python3 graphics.py to keep the file running
  5. execute the executable file created using ./tictactoe
  6. for Windows - tictactoe.exe
  7. Happy Playing!