-
Notifications
You must be signed in to change notification settings - Fork 19
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
Merge saving game state #36
Merge saving game state #36
Conversation
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.
Only small coding style fixes.
I recommend using "haiku-format". It also includes "git-haiku-format" to only re-format the touched parts.
Game.cpp
Outdated
bool loadOK = true; | ||
|
||
for(int i =0;i<fSizeX*fSizeY;i++) { | ||
loadOK = loadOK && saveMessage.FindUInt32("board",i,&fBoard[i]) == B_OK; |
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'm tiring adding all those spaces... :)
Below, also add a space before commas etc.
Two things I found:
|
Game.cpp
Outdated
|
||
BMessage saveMessage(H2048_SAVE_MESSAGE); | ||
status_t result = saveMessage.Unflatten(&saveFile); | ||
if(result!= B_OK) { | ||
if (result != B_OK) | ||
return 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.
Missed the closing curly bracket.
24b50bb
to
84a2e75
Compare
Very good. Merge! |
This PR is an attempt to complete a previous PR (#26 ) by fixing the comments on coding style. The original code seems to work great otherwise, and the game state and window position is saved when exiting the game.
Please let me know if there still are discrepancies in the coding style.