From 271c0ffdaa0dbde28868fbdf67f86930a11744cd Mon Sep 17 00:00:00 2001 From: Kevin Buffardi Date: Thu, 16 Feb 2023 21:58:57 -0800 Subject: [PATCH 1/5] Refactor counter as roll_counter --- GameDie.cpp | 16 ++++++++-------- GameDie.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GameDie.cpp b/GameDie.cpp index d512405..e9fb279 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -7,10 +7,10 @@ GameDie::GameDie() { srand(time(NULL)); - counter.resize(FACES); + roll_counter.resize(FACES); for(int i=0; i GameDie::get_distribution(){ - return counter; + return roll_counter; } diff --git a/GameDie.h b/GameDie.h index 54d69ba..939e8f7 100644 --- a/GameDie.h +++ b/GameDie.h @@ -13,7 +13,7 @@ class GameDie vector get_distribution(); private: - vector counter; + vector roll_counter; const static int FACES = 6; }; From b82e5153ffc7c59431803da6f66a557a5f47caf6 Mon Sep 17 00:00:00 2001 From: Tim Lyons Date: Mon, 20 Feb 2023 11:43:14 -0800 Subject: [PATCH 2/5] Added yaml file to build on push resolves #107 --- .github/workflows/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..200c9b3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,14 @@ +name: CPP CI + +on: + push: + branches: [ "main" ] + +jobs: + buildcpp: + + runs-on: ubuntu-latest + steps: + - name: Running g++ + run: | + g++ -Wall *.cpp \ No newline at end of file From 15025b306db7a32f29d289e3682d40292de30447 Mon Sep 17 00:00:00 2001 From: AverageOtter <57277126+AverageOtter@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:45:36 -0800 Subject: [PATCH 3/5] Updated Readme to have cpp CI --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a8fe2c..03b672a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![.github/workflows/main.yml](https://github.com/AverageOtter/GameDie/actions/workflows/main.yml/badge.svg)](https://github.com/AverageOtter/GameDie/actions/workflows/main.yml) # GameDie This repository provides a class that represents a game die, such as the @@ -23,4 +24,4 @@ Once built, run the image: ...or run it with a bind mount to the current source code: -`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container` \ No newline at end of file +`docker run --mount type=bind,source="$(pwd)",target=/usr/src -it cpp-container` From ba86e60441c42ab8ae789202b5acff340224f8d9 Mon Sep 17 00:00:00 2001 From: AverageOtter <57277126+AverageOtter@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:47:54 -0800 Subject: [PATCH 4/5] Update main.yml --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 200c9b3..ee8024f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,10 +5,8 @@ on: branches: [ "main" ] jobs: - buildcpp: - runs-on: ubuntu-latest steps: - name: Running g++ run: | - g++ -Wall *.cpp \ No newline at end of file + g++ -Wall *.cpp From e3ed91ecf5539bcef2dbcf0d5dc489c2e93f0698 Mon Sep 17 00:00:00 2001 From: AverageOtter <57277126+AverageOtter@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:49:14 -0800 Subject: [PATCH 5/5] Error Debugging Yaml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee8024f..e9aa450 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: [ "main" ] jobs: + name: Buildcpp runs-on: ubuntu-latest steps: - name: Running g++