This commit is contained in:
Thomas 2022-01-09 21:49:40 +01:00
parent 947665d306
commit 31033a7d53
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7
4 changed files with 8 additions and 7 deletions

View File

@ -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"

View File

@ -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

View File

@ -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;
}

View File

@ -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