diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..809dbaf --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,19 @@ +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 all + run: make all 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) diff --git a/GameDie.cpp b/GameDie.cpp index d512405..ed3ef76 100644 --- a/GameDie.cpp +++ b/GameDie.cpp @@ -44,3 +44,14 @@ int GameDie::roll() 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; +} diff --git a/GameDie.h b/GameDie.h index 54d69ba..f84b192 100644 --- a/GameDie.h +++ b/GameDie.h @@ -2,7 +2,7 @@ #define GAMEDIE_H #include -using std::vector; +using namespace std; class GameDie { diff --git a/configure b/configure new file mode 100755 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