diff --git a/config.yml b/config.yml index f4c8977..294ebd7 100644 --- a/config.yml +++ b/config.yml @@ -1,6 +1,6 @@ # General configuration general: - maxFPS: 30 + maxFPS: 90 # Players config players: @@ -54,6 +54,6 @@ projectiles: # Grid definition # You can add more rows, make rows longer and add spaces grid: - - " " - - " " - - "B" + - "AAAAAAAAAA" + - "BBBBBBBBBB" + - "CCCCCCCCCC" diff --git a/headers/game.h b/headers/game.h index cc30b0c..e47d424 100644 --- a/headers/game.h +++ b/headers/game.h @@ -72,7 +72,7 @@ private: /*! * @brief Invader scroll direction - True = right , False = left */ - bool direction = true; + bool direction; /*! * @brief list of postion of all missiles shot by the invaders diff --git a/src/game/gameBasics.cpp b/src/game/gameBasics.cpp index 9a87e55..9a25725 100644 --- a/src/game/gameBasics.cpp +++ b/src/game/gameBasics.cpp @@ -42,7 +42,6 @@ void Game::handleScoreSaving(){ void Game::managedGames() { playMode = PlayMode::NONE; - god.state = GodState::NONE; while(playMode!=PlayMode::EXIT){ if(playMode==PlayMode::NONE){ @@ -65,6 +64,7 @@ void Game::initGame(){ players.clear(); missiles.clear(); + god.state = GodState::NONE; torpedos.clear(); if(playMode==PlayMode::SINGLE){ @@ -82,6 +82,7 @@ void Game::initGame(){ } basePos = Position(200, 0); + direction = true; } diff --git a/src/game/godManager.cpp b/src/game/godManager.cpp index d067bc6..735576a 100644 --- a/src/game/godManager.cpp +++ b/src/game/godManager.cpp @@ -116,7 +116,7 @@ bool Game::manageGod() { touched = true; /* there are no invaders in the grid anymore, and the one thrown just went out of bound - * So... return true, the playere wins*/ + * So... return true, the player wins*/ if(!areThereInvadersLeft())return true; // check player collision