Skip to content

dzm-fiodarau/Risk-Boardgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors MIT License GitHub last commit (branch)


COMP345-RISK

Turn-based, real-time strategy game built entirely in c++
Report Bug · Request a Feature

About

This is a Risk console game developed in the context of a school assignment.

Installation

Prerequisites

Next Next Next

First, get the source code of the program. You can download the project files, or you can do the same through the command line (see below).

# Copy repository
git clone https://github.com/dzm-fiodarau/COMP345-RISK

# Enter directory of cloned repo
cd COMP345-RISK

Note that the project uses CMake to generate project files from the configuration in the CMakeLists.txt file. Building using CMake is preferred. Below we build and run the project using g++ and CMake.

1. Just with g++

# FOR WINDOWS
# In the directory of the source code
# Create output directory
mkdir bin

After making the build/bin directory, then you need to build the project. This can be done using the following command below:

g++ -o ./bin/COMP345_RISK -std=c++20 -I./headers ./src/*.cpp ./src/commandprocessing/*.cpp ./src/drivers/*.cpp ./src/gameengine/*.cpp ./src/player/*.cpp

After running the command, we can run the executable directly:

# Run built executable
./bin/COMP345_RISK

2. Using CMake

# FOR WINDOWS
# In the directory of the source code
# Create build directory
mkdir bin

# Generates the build files given the project files 
cmake -S ./ -B ./bin/

# Generates the executable from the build files
cmake --build ./bin/

# Run build executable
./bin/Debug/COMP345_RISK

Using the program

After obtaining an executable, you can then specify additional command line arguments:

Specifying the input

You can specify from where the program will take input from. You can put commands in a file and watch the game play. By default, the game is set to console/player input.

# Assuming the name of the executable is 'COMP345_RISK'
# File input
./COMP345_RISK [-file] FILEPATH

# Console input
./COMP345_RISK [-console]

# Or without any arguments specified
./COMP345_RISK

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published