Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Pasue implementation #14

wants to merge 1 commit into from

Conversation

TheSebgon
Copy link

All green, sorry for being kinda late but i had to leave for some time ;)
image

void Controller::handleDirectionChange(const DirectionInd& directionInd)
{
if(bGamePause==true) {return;};
Copy link
Collaborator

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);
Copy link
Collaborator

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? :)

Copy link
Author

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;
Copy link
Collaborator

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.

Copy link
Collaborator

@npyka-nokia npyka-nokia left a 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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants