From 8f24a307f83d1653bd15f02894a78b2f2fdd5361 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 10 Jan 2022 08:50:48 +0100 Subject: [PATCH] flm --- headers/configManagement.h | 2 ++ src/game/gameBasics.cpp | 5 +---- src/scoresManager.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/headers/configManagement.h b/headers/configManagement.h index a61303b..e18d025 100644 --- a/headers/configManagement.h +++ b/headers/configManagement.h @@ -12,6 +12,8 @@ #ifndef SPACE_CONFIGMANAGEMENT_H #define SPACE_CONFIGMANAGEMENT_H +#include + /* * This header will only be imported once, but Djalim told me he would hurt me * if I didn't move it into his own header file instead of the cpp file diff --git a/src/game/gameBasics.cpp b/src/game/gameBasics.cpp index 9a25725..0764c42 100644 --- a/src/game/gameBasics.cpp +++ b/src/game/gameBasics.cpp @@ -154,8 +154,5 @@ Position Game::invIndexToPos(unsigned x, unsigned y) const { } bool Game::arePlayersDead() { - for(Player& p : players){ - if(!p.isEliminated())return false; - } - return true; + return all_of(players.begin(), players.end(), [](Player& p){return p.isEliminated();}); } diff --git a/src/scoresManager.cpp b/src/scoresManager.cpp index d27532d..ac9328f 100644 --- a/src/scoresManager.cpp +++ b/src/scoresManager.cpp @@ -18,7 +18,7 @@ // Our own format : kustom #define SCORE_FILE "scores.kus" -#define SECRET_KEY "WeAreAGroupOf3" +#define SECRET_KEY "HelloWorld" void readWholeFile(const ifstream& ifs, string& str){ stringstream ss;