From 006ec957e729c7d8e1f82558e22d8acde164949a Mon Sep 17 00:00:00 2001 From: Alexcyfy <42755377+Alexcyfy@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:06:17 -0800 Subject: [PATCH 1/7] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 17 +++++++++++++++++ 1 file changed, 17 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..c52d3be --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,17 @@ +name: C/C++ CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Compile C++ 2-17 + run: make From 217f9167e03af584581f266e5c9b01f137ebcb43 Mon Sep 17 00:00:00 2001 From: Alex-Collanton Date: Mon, 21 Feb 2022 11:10:49 -0800 Subject: [PATCH 2/7] Made it so player can quit with command --- main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 3d81b0a..6044abb 100644 --- a/main.cpp +++ b/main.cpp @@ -20,10 +20,15 @@ int main(){ // REVEAL ANSWER: std::cout << secret << std::endl; std::cout << "Welcome to Wordler -- a game that totally isn't simplified Wordle\n"; std::cout << "Guess your five-letter word:\n_____\n"; + std::cout << "Type quit if you want to quit the game!\n"; do{ do{ std::cin >> guess; + if(guess == "quit") + { + exit(0); + } }while( guess.length() != 5 ); // capitalize guess for easy comparisons @@ -54,4 +59,4 @@ std::string get_hint(std::string match, std::string word){ } } return word; -} \ No newline at end of file +} From 9b60cd934b9284b7fedc6066d1d3aea50396dd18 Mon Sep 17 00:00:00 2001 From: Alexcyfy <42755377+Alexcyfy@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:14:50 -0800 Subject: [PATCH 3/7] Delete .github/workflows directory --- .github/workflows/c-cpp.yml | 17 ----------------- 1 file changed, 17 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 c52d3be..0000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Compile C++ 2-17 - run: make From d25655831f31144e7ce4c96f245222dccb58cee7 Mon Sep 17 00:00:00 2001 From: Alexcyfy <42755377+Alexcyfy@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:20:09 -0800 Subject: [PATCH 4/7] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 18 ++++++++++++++++++ 1 file changed, 18 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..e546cd2 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,18 @@ +name: C/C++ CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Compile C++ 2-17 + run: make + From 0980d95e1ff655b08467eea6fe838c17baaa8a8e Mon Sep 17 00:00:00 2001 From: Alexcyfy <42755377+Alexcyfy@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:21:02 -0800 Subject: [PATCH 5/7] Create makefile.yml --- .github/workflows/makefile.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/makefile.yml diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..5545bf8 --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,20 @@ +name: Makefile CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Compile C++ 2-17 + run: make + + From 661d5176b851333098d8ca8aee6fdf7d9ae46c00 Mon Sep 17 00:00:00 2001 From: Alexcyfy <42755377+Alexcyfy@users.noreply.github.com> Date: Mon, 21 Feb 2022 11:24:49 -0800 Subject: [PATCH 6/7] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7c25da2..56e5bee 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,10 @@ Then play the game: ./wordler ``` -The game will randomly-select a 5-letter word and you have unlimited guesses to get the word right. Each time you guess, if you have a letter that matches the same location as it is in the secret word, it will be revealed to you. However, any letter that does *not* match the secret word's letter at the same location will be displayed as `_`. Good luck! \ No newline at end of file +The game will randomly-select a 5-letter word and you have unlimited guesses to get the word right. Each time you guess, if you have a letter that matches the same location as it is in the secret word, it will be revealed to you. However, any letter that does *not* match the secret word's letter at the same location will be displayed as `_`. Good luck! + +[![C/C++ CI](https://github.com/Alexcyfy/Wordler/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/Alexcyfy/Wordler/actions/workflows/c-cpp.yml) + +``` +The player can also type quit during the guessing stage to quit the game. +``` From bb7f6a30d25f27e43fa6905fc2dcfbcc10e4a966 Mon Sep 17 00:00:00 2001 From: Alex-Collanton Date: Mon, 21 Feb 2022 11:26:24 -0800 Subject: [PATCH 7/7] Added thank you message --- main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/main.cpp b/main.cpp index 6044abb..4380390 100644 --- a/main.cpp +++ b/main.cpp @@ -27,6 +27,7 @@ int main(){ std::cin >> guess; if(guess == "quit") { + std::cout<<"Thanks for playing!\n"; exit(0); } }while( guess.length() != 5 );