-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasue implementation #14
base: master
Are you sure you want to change the base?
Conversation
void Controller::handleDirectionChange(const DirectionInd& directionInd) | ||
{ | ||
if(bGamePause==true) {return;}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for the semicolon in the end ;)
@@ -37,13 +37,14 @@ class Controller : public IEventHandler | |||
void handleDirectionChange(const DirectionInd&); | |||
void handleFoodPositionChange(const FoodInd& receivedFood); | |||
void handleNewFood(const FoodResp& requestedFood); | |||
|
|||
void handlePauseI(const PauseInd& pause); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you mean handlePauseId? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yea it would be better :D
struct Segment | ||
{ | ||
int x; | ||
int y; | ||
int ttl; | ||
}; | ||
bool bGamePause = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go with a bool name showing condition like isGamePaused here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor is great, some minor remarks added :)
All green, sorry for being kinda late but i had to leave for some time ;)
