-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
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.
A few style changes, see CONTRIBUTING.md#code-style.
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
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.
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.
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
byte tile = board[y * boardWidth + x]; | ||
boolean flagged = (tile & 2) > 0; | ||
boolean covered = (tile & 1) == 0; | ||
int type = (tile & 0b1100) >>> 2; |
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.
These should still be helper functions, and the type should be made of named constants.
src/main/java/net/earthcomputer/clientcommands/command/MinesweeperCommand.java
Outdated
Show resolved
Hide resolved
# Conflicts: # src/main/resources/assets/clientcommands/lang/en_us.json
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.
Sorry, was meant to mention this in the last review but forgot
review needed, esp on art