Skip to content

SulaimanNiazi/Cpp-Snakes-and-Ladders-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Snakes and Ladders Game

This project contains the classic Snakes and Ladders game.

Project Structure

The project has the following structure:

src/
    Snakes and Ladders.cpp
    output/
        Snakes and Ladders.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 games from within Visual Studio Code using the provided launch configuration.

  1. Open the file you want to run (e.g., Snakes and Ladders.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.