Skip to content
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

Kelly Tran: Scrabble JS #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Kelly Tran: Scrabble JS #41

wants to merge 2 commits into from

Conversation

KellyPT
Copy link

@KellyPT KellyPT commented Nov 23, 2016

I did it! Yay! Thank you for the deadline extension and arranging a tutor for me! @kariabancroft @droberts-ada

highestScore = wordScore;
}
else if (highestScore === wordScore && highestWord.length !== 7 && highestWord.length > wordLen ) {
highestWord = arrayOfWords[i];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're using the arrayOfWords[i] variable a bunch so it might be good to assign it to a variable to make the code more readable.

};

this.highestScoreFrom = function(arrayOfWords) {
var highestWord = arrayOfWords[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job using the score of the first word to ensure accurate results


// hasWon(): Function which returns true if the player has over 100 points, otherwise returns false
Player.prototype.hasWon = function() {
if (this.totalScore() > 100) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! Note: you can use ternary operators (using the ?) in JS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants