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

Added cminesweeper command #638

Merged
merged 14 commits into from
May 29, 2024
Merged

Conversation

RealRTTV
Copy link
Contributor

review needed, esp on art

Copy link
Collaborator

@xpple xpple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few style changes, see CONTRIBUTING.md#code-style.

xpple
xpple previously requested changes May 28, 2024
Copy link
Collaborator

@xpple xpple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Some more mostly style changes. The game logic looks correct but to be honest I didn't have the time to understand it all. I am assuming you tested it well.

byte tile = board[y * boardWidth + x];
boolean flagged = (tile & 2) > 0;
boolean covered = (tile & 1) == 0;
int type = (tile & 0b1100) >>> 2;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should still be helper functions, and the type should be made of named constants.

Copy link
Owner

@Earthcomputer Earthcomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, was meant to mention this in the last review but forgot

@Earthcomputer Earthcomputer merged commit 6f9d6a9 into Earthcomputer:fabric May 29, 2024
1 check passed
@RealRTTV RealRTTV deleted the minesweeper branch May 29, 2024 21:40
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.

4 participants