From dc07ae68526a714cbae99c5af9e2b9fec1fdafd6 Mon Sep 17 00:00:00 2001 From: Acsimon112 Date: Wed, 24 Sep 2025 11:13:35 -0700 Subject: [PATCH 1/3] Added cases to close program when 'nothing' is entered. closes chicostate #1 --- main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.cpp b/main.cpp index 982d05f..cd5d2ed 100644 --- a/main.cpp +++ b/main.cpp @@ -19,11 +19,17 @@ int main(){ pick = rand() % 4; cout << "What are you listening to?\n"; getline(cin,input); + if(input == "nothing"){ + return 0; + } cout << VALIDATION[pick] << "! Let's listen to more\n"; do{ cout << "What's next?\n"; getline(cin,input); + if(input == "nothing"){ + return 0; + } pick = rand() % 4; cout << VALIDATION[pick] << "!\n"; }while( input != "nothing" ); From 7d4cddb827c54a3a000c9d591214b6afe337a1ec Mon Sep 17 00:00:00 2001 From: Acsimon112 Date: Wed, 24 Sep 2025 11:32:01 -0700 Subject: [PATCH 2/3] terminates on nothing entry, closes #1 --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index cd5d2ed..398d3c9 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,7 @@ using std::endl; using std::string; using std::vector; -const vector VALIDATION = {"Cool","Great","Perfect","Beautiful"}; +const vector VALIDATION = {"Coo","Great","Perfect","Beautiful"}; int main(){ string input; From a3f99ab12f67a25cbdf7c8478d4f861b9efcdf23 Mon Sep 17 00:00:00 2001 From: Acsimon112 Date: Wed, 24 Sep 2025 11:47:21 -0700 Subject: [PATCH 3/3] added continuous integration, closes #2 --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1507baf --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: "**" + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: g++ main.cpp \ No newline at end of file