-
Notifications
You must be signed in to change notification settings - Fork 44
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
create board #49
base: gh-pages
Are you sure you want to change the base?
create board #49
Conversation
created board that is clickable. unable to figure out how to randomize spans.
shuffle function and more
var self = this | ||
this.div.click(function(){ | ||
self.handleClick(); | ||
}) |
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.
FYI, you could also write this as this.div.click(this.handleClick.bind(this))
.
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.
Yes, I sort of remember talking about this in class. I also just watched a tutorial about factory functions and how to avoid using "this", so trying to process that too, hehe.
Looks good overall! Take a look at the warnings, as it makes some good suggestions. In particular, using semicolons or not is fine (I would recommend the former), but please be consistent about it! |
I still have a little confusion as to when to use other classes vs subclasses. With the "shuffle" and "removeAndPrintElements" functions, should that they been put into its own class or somehow included in the Tile class? |
A subclass makes sense when you have a more specialized version of a thing, e.g. if this game were to have a concept of |
created board that is clickable.
unable to figure out how to randomize spans.