-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. I would go with a bool name showing condition like isGamePaused here. |
||
|
||
Segment getNewHead() const; | ||
bool doesCollideWithSnake(const Segment& newSegment) const; | ||
|
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 ;)