From 021f21bb0f0340a87b2ecdbe77f62564ad85c1b5 Mon Sep 17 00:00:00 2001 From: "Leila F. Rahman" Date: Fri, 30 Sep 2022 13:27:32 +0200 Subject: [PATCH 1/5] Update main.cpp --- cpp-game-vs/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpp-game-vs/main.cpp b/cpp-game-vs/main.cpp index aef75b2..6750a52 100644 --- a/cpp-game-vs/main.cpp +++ b/cpp-game-vs/main.cpp @@ -7,8 +7,6 @@ int main() { int plays = Global::number_of_play(), counter = 0, player_score = 0, ai_score = 0; auto ai = ComputerResponse::random_actions(plays); - char t[4] = "C++"; - strcpy_s(t, "C++++++"); int* mypointer; From 772849a2e0de9aabaeb2202431e717e57afcf806 Mon Sep 17 00:00:00 2001 From: andriopoulou-danai <78960522+andriopoulou-danai@users.noreply.github.com> Date: Mon, 7 Nov 2022 09:18:05 +0100 Subject: [PATCH 2/5] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37bd8e2..f1d5c30 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: TICS Action Run - uses: tiobe/tics-github-action@main + uses: tiobe/tics-github-action@annotations-improvements env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} TICSAUTHTOKEN: 'MmQ0NTRjZmEtZTY0ZC00N2NiLWI0M2YtYzgxOWY2MzEyNGUyOk54LE4vcG9ZKFp7TFlzWg' From 019bdb14af0f2b99004b66f60f7c1ca4f4132743 Mon Sep 17 00:00:00 2001 From: andriopoulou-danai <78960522+andriopoulou-danai@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:14:03 +0100 Subject: [PATCH 3/5] Update game.h --- cpp-game-vs/game.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-game-vs/game.h b/cpp-game-vs/game.h index 64e9c44..6219cd1 100644 --- a/cpp-game-vs/game.h +++ b/cpp-game-vs/game.h @@ -1,4 +1,4 @@ -#ifndef GAME_H +#ifndef GAME_H #define GAME_H #include From 5753ea0aef61d9722a4d868f6cc9c685b4f83c00 Mon Sep 17 00:00:00 2001 From: andriopoulou-danai <78960522+andriopoulou-danai@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:14:34 +0100 Subject: [PATCH 4/5] Update main.cpp --- cpp-game-vs/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp-game-vs/main.cpp b/cpp-game-vs/main.cpp index 6750a52..bf0509b 100644 --- a/cpp-game-vs/main.cpp +++ b/cpp-game-vs/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include "game.h" using namespace std; @@ -10,7 +10,7 @@ int main() int* mypointer; - mypointer = NULL; + mypointer = NULL; *mypointer = 30; wchar_t w = L'Â'; From 68d452a9dbd44b944868df33a71ba5028392e4e7 Mon Sep 17 00:00:00 2001 From: andriopoulou-danai <78960522+andriopoulou-danai@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:15:47 +0100 Subject: [PATCH 5/5] Update game.cpp --- cpp-game-vs/game.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cpp-game-vs/game.cpp b/cpp-game-vs/game.cpp index 448dc56..476cace 100644 --- a/cpp-game-vs/game.cpp +++ b/cpp-game-vs/game.cpp @@ -1,4 +1,4 @@ -#include "game.h" +#include "game.h" #include #include @@ -52,12 +52,12 @@ Rule::Choice Rule::GameLogic::operator()(const Rule::Choice lhs, const Rule::Cho if (lhs == rhs) throw std::domain_error("Do not handle same choice of symbol"); /* - * • Fist equals rock - * • Open hand equals paper - * • Showing the index and middle finger equals scissors. - * • paper beats (wraps) rock - * • rock beats (blunts) scissors - * • scissors beats (cuts) paper. + * • Fist equals rock + * • Open hand equals paper + * • Showing the index and middle finger equals scissors. + * • paper beats (wraps) rock + * • rock beats (blunts) scissors + * • scissors beats (cuts) paper. */ std::map, Rule::Choice> rule; rule[std::make_tuple(Rule::Choice::ROCK, Rule::Choice::PAPER)] = Rule::Choice::PAPER; @@ -77,7 +77,7 @@ std::unique_ptr ComputerResponse::random_actions(size_t number_g const int number_of_choices = 3; srand( (unsigned)time( NULL ) ); for (size_t i = 0; i < number_games_tobe_played; ++i) { - p[i] = Global::mapping_choice(rand() % number_of_choices + 1); + p[i] = Global::mapping_choice(rand() % number_of_choices + 1); } return p; }