Skip to content

SulaimanNiazi/Cpp-XO-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

C++ XO Game

This project contains the classic XO game, also known as Tic-Tac-Toe.

Project Structure

The project has the following structure:

src/
    XO.cpp
    output/
        XO.exe

Getting Started

Prerequisites

  • GCC or any compatible C++ compiler
  • GDB for debugging (optional)
  • Visual Studio Code (recommended)

Building the Project

To build the project, you can use the provided configuration in the .vscode folder. Ensure you have the necessary compilers and tools installed as specified in the .vscode/settings.json and .vscode/c_cpp_properties.json files.

  1. Open the project in Visual Studio Code.
  2. Build the project using the build task:
    Ctrl+Shift+B

Running the Game

The game can be run by executing its .exe file in the output directory. Alternatively, you can run the game from within Visual Studio Code using the provided launch configuration.

  1. Open the game file you want to run (e.g., XO.cpp).
  2. Start debugging by pressing F5 or by selecting Run > Start Debugging.

Debugging

The project includes a debug configuration for Visual Studio Code. To start a debug session:

  1. Open the game file you want to debug.
  2. Press F5 or go to Run > Start Debugging.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests with improvements or new games.