From 07c542796465993db39ab26de114ea6f1b02599e Mon Sep 17 00:00:00 2001 From: Tiggzzz Date: Wed, 24 Sep 2025 11:22:34 -0700 Subject: [PATCH 1/2] fixed nothing validation, closes #1 --- main.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/main.cpp b/main.cpp index 982d05f..f6c1722 100644 --- a/main.cpp +++ b/main.cpp @@ -19,14 +19,16 @@ int main(){ pick = rand() % 4; cout << "What are you listening to?\n"; getline(cin,input); - cout << VALIDATION[pick] << "! Let's listen to more\n"; + if (input != "nothing"){ + cout << VALIDATION[pick] << "! Let's listen to more\n"; - do{ - cout << "What's next?\n"; - getline(cin,input); - pick = rand() % 4; - cout << VALIDATION[pick] << "!\n"; - }while( input != "nothing" ); + do{ + cout << "What's next?\n"; + getline(cin,input); + pick = rand() % 4; + cout << VALIDATION[pick] << "!\n"; + }while( input != "nothing" ); + } return 0; } \ No newline at end of file From 77c29c3588182199fa4020669e8d770ebb8fa47d Mon Sep 17 00:00:00 2001 From: Tiggzzz Date: Wed, 24 Sep 2025 11:39:18 -0700 Subject: [PATCH 2/2] created a CI workflow, closes #2 --- .github/workflows/compile.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..d0d4c5f --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,15 @@ +name: Build C++ + +on: + pull_request: + branches: [ main ] + commit: + branches: [ devops ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: g++ -std=c++17 main.cpp \ No newline at end of file