-
Notifications
You must be signed in to change notification settings - Fork 48
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
submit #24
base: master
Are you sure you want to change the base?
submit #24
Conversation
} | ||
} | ||
|
||
var _squarePiece = function() { |
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.
It looks like there's a bunch of duplication between the _piece
functions. You might be able to pull out the data that defines the shape of each piece into a simple data structure, and then pass those settings into a more generic _piece
function.
One tactic you could try for this refactoring would be to identify what changes between each function and pass those into the function as arguments.
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.
Overall, this looks great! I can't seem to get the rotation to work though :O What key am I supposed to press?
No description provided.