removed last TODO
This commit is contained in:
parent
b7632df576
commit
9dc5a03427
@ -221,10 +221,10 @@ private:
|
||||
bool invadersTouchPlayer() const;
|
||||
|
||||
/*!
|
||||
* @brief change god's state to awake
|
||||
* @fn void awakeGod();
|
||||
* @brief Try to awake god, if not already awaken
|
||||
* @fn void tryAwakeGod();
|
||||
*/
|
||||
void awakeGod();
|
||||
void tryAwakeGod();
|
||||
|
||||
/*!
|
||||
* @brief make god behave
|
||||
|
@ -108,10 +108,7 @@ WinValue Game::enterGameLoop(){ // returns when game is finished
|
||||
managePlayers();
|
||||
if(manageInvaders()) { // if they went down
|
||||
if (invadersTouchPlayer())return WinValue::INVADERS;
|
||||
// TODO abstract this ?
|
||||
if (basePos.getY() > 100 /*lambda value*/ && god.state==GodState::NONE) {
|
||||
awakeGod();
|
||||
}
|
||||
tryAwakeGod();
|
||||
}
|
||||
|
||||
if(manageGod())return WinValue::PLAYERS;
|
||||
|
@ -10,9 +10,11 @@
|
||||
|
||||
#include "game.h"
|
||||
|
||||
void Game::awakeGod() {
|
||||
god.counter = 0;
|
||||
god.state = GodState::AWAKE;
|
||||
void Game::tryAwakeGod() {
|
||||
if (basePos.getY() > 100 /*lambda value*/ && god.state==GodState::NONE) {
|
||||
god.counter = 0;
|
||||
god.state = GodState::AWAKE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user