From 9f7d9e48ba7ecb5be295e473559e70fbdc353e34 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:11:59 -0800 Subject: [PATCH 01/16] Created Action To Run Docker --- .github/workflows/docker-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..d657a63 --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) From 9b748fb9171a36752cc6e5b66e8cfb3526d690a8 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:13:17 -0800 Subject: [PATCH 02/16] Added Action To Run Code --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..b00b272 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From ed455e608c9ac13051cdcf962e106c11abe73e33 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:17:24 -0800 Subject: [PATCH 03/16] removed "::vector" from the using std call. --- GameDie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameDie.h b/GameDie.h index 54d69ba..e4a0c3a 100644 --- a/GameDie.h +++ b/GameDie.h @@ -2,7 +2,7 @@ #define GAMEDIE_H #include -using std::vector; +using std; class GameDie { From 69fbd9c7784bec46c3db146c1a009695be9983ea Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:18:20 -0800 Subject: [PATCH 04/16] Changed Workflow for make file --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b00b272..3a4620a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,8 +13,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: configure - run: ./configure + - name: GameDie + run: ./GameDie.cpp - name: make run: make - name: make check From e3b26c64a2387f40dafe67d23b3af5444cb1d9e7 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:19:20 -0800 Subject: [PATCH 05/16] Delete c-cpp.yml --- .github/workflows/c-cpp.yml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml deleted file mode 100644 index 3a4620a..0000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: GameDie - run: ./GameDie.cpp - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck From 4569a3f1db92ad8ba7f70e815d2956a3675f82ed Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:25:07 -0800 Subject: [PATCH 06/16] Added C++ Workflow for Make --- .github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..b00b272 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,23 @@ +name: C/C++ CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From 3ba82a76e3f69bc6aeb71440b2922fd6c70800d7 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:31:06 -0800 Subject: [PATCH 07/16] Added configuration file --- .configure | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .configure diff --git a/.configure b/.configure new file mode 100644 index 0000000..6f3d8ba --- /dev/null +++ b/.configure @@ -0,0 +1,4 @@ +CXX=g++ # The C++ compiler +CXXFLAGS=-g # C++ complilation flags +NATIVE=on # compiles code targeted to current hardware +TUNE=generic # performance-tuning switch From e5a1166340d899af7a9b195813d7af421838b77e Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:32:44 -0800 Subject: [PATCH 08/16] Removed not used make commands from Workflow c++ --- .github/workflows/c-cpp.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b00b272..809dbaf 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,9 +15,5 @@ jobs: - uses: actions/checkout@v3 - name: configure run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + - name: make all + run: make all From 6a8c4ac7a38990bc78ad29ef0b08f2ead674099f Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:33:15 -0800 Subject: [PATCH 09/16] Delete .configure --- .configure | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .configure diff --git a/.configure b/.configure deleted file mode 100644 index 6f3d8ba..0000000 --- a/.configure +++ /dev/null @@ -1,4 +0,0 @@ -CXX=g++ # The C++ compiler -CXXFLAGS=-g # C++ complilation flags -NATIVE=on # compiles code targeted to current hardware -TUNE=generic # performance-tuning switch From c6a162becca4dce5317df3ee1ecda56eb72bf089 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:33:28 -0800 Subject: [PATCH 10/16] Create configure --- configure | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 configure diff --git a/configure b/configure new file mode 100644 index 0000000..6f3d8ba --- /dev/null +++ b/configure @@ -0,0 +1,4 @@ +CXX=g++ # The C++ compiler +CXXFLAGS=-g # C++ complilation flags +NATIVE=on # compiles code targeted to current hardware +TUNE=generic # performance-tuning switch From 4e1e801d981435e45bd94f0a173b298c276001cf Mon Sep 17 00:00:00 2001 From: Caleb Besser Date: Mon, 20 Feb 2023 11:35:24 -0800 Subject: [PATCH 11/16] Changed permissions on configure --- configure | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 configure diff --git a/configure b/configure old mode 100644 new mode 100755 From efd5647adfb72ceb487fbd8fd97eebcef9a3cc09 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:36:34 -0800 Subject: [PATCH 12/16] Update GameDie.h --- GameDie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameDie.h b/GameDie.h index e4a0c3a..54d69ba 100644 --- a/GameDie.h +++ b/GameDie.h @@ -2,7 +2,7 @@ #define GAMEDIE_H #include -using std; +using std::vector; class GameDie { From 8cc4ee8449e9dad6e106de38f896c552d4d010ab Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:40:11 -0800 Subject: [PATCH 13/16] Update GameDie.h --- GameDie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameDie.h b/GameDie.h index 54d69ba..e4a0c3a 100644 --- a/GameDie.h +++ b/GameDie.h @@ -2,7 +2,7 @@ #define GAMEDIE_H #include -using std::vector; +using std; class GameDie { From a96450e4bede9c96ffc787b8eb1c3df190eb0150 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:41:11 -0800 Subject: [PATCH 14/16] Update GameDie.h --- GameDie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameDie.h b/GameDie.h index e4a0c3a..f84b192 100644 --- a/GameDie.h +++ b/GameDie.h @@ -2,7 +2,7 @@ #define GAMEDIE_H #include -using std; +using namespace std; class GameDie { From b8f71bef463ec86f9277f86e6fbabf46ea3d8499 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:43:28 -0800 Subject: [PATCH 15/16] Update GameDie.cpp --- GameDie.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GameDie.cpp b/GameDie.cpp index d512405..474ea6d 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -44,3 +44,7 @@ int GameDie::roll() vector GameDie::get_distribution(){ return counter; } + +int main(){ + return 0; +} From d527bf5904401be0f89a26d3e0d55c334a066df0 Mon Sep 17 00:00:00 2001 From: CalebBesser <123990006+CalebBesser@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:49:44 -0800 Subject: [PATCH 16/16] Added get_percentages closed #106 --- GameDie.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GameDie.cpp b/GameDie.cpp index 474ea6d..ed3ef76 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -45,6 +45,13 @@ vector GameDie::get_distribution(){ return counter; } +vector GameDie::get_percentages(){ + for(int i = 0; i < (int)counter.size();i++){ + int temp = 0; + temp = counter[i]/(int)counter.size(); + } + + return temp; int main(){ return 0; }