-
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
Emily's JS Scrabble #19
base: master
Are you sure you want to change the base?
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.
Nicely done Emily, good work on the Tilebag as well.
} | ||
} | ||
} | ||
return highest[0]; |
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.
Good work with this one!
for (var i = 0; i < num; i++){ | ||
var chosen = Math.floor(Math.random() * this.tiles.length); | ||
tilesPicked.push(this.tiles.splice(chosen, 1)[0]); | ||
} |
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.
Good use of both splice & push to take a letter out of the tilebag and put it into the tilesPicked.
No description provided.