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
Clean up new Maze Class #20411
Clean up new Maze Class #20411
Conversation
45c8c14
to
7ee525c
Compare
8da7791
to
7cc4a97
Compare
7cc4a97
to
87d52e1
Compare
78d3fab
to
ad88f59
Compare
87d52e1
to
0a61e91
Compare
this.pegmanX; | ||
this.pegmanY; | ||
|
||
this.MAZE_HEIGHT; |
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.
Since these aren't actually constants, we may want to stop capitalizing them.
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.
Agreed; the goal of this PR is mostly to help draw the limits of what can and cannot be easily refactored, I'm gonna do most of the actual refactoring in other PRs
apps/src/maze/maze.js
Outdated
@@ -124,10 +153,10 @@ module.exports = class Maze { | |||
this.PATH_WIDTH = this.SQUARE_SIZE / 3; | |||
} | |||
|
|||
createAnimations(svg) { | |||
_createAnimations(svg) { |
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've seen a lot more "private" methods in our codebase with the underscore as a suffix rather than a prefix. Any particular reason to go with the prefix here?
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.
Oh, right you are; I'll update them for consistency
eead1e1
to
ce2f94a
Compare
…eventual documentation
ce2f94a
to
8b0e0d9
Compare
Follow-up to #20408