-
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
Jeannie's Scrabble #38
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.
Jeannie, wow, this is an amazing piece of work. Just a few comments, but this is an amazing amount of work.
[".", "=", ".", ".", ".", "*", ".", ".", ".", "*", ".", ".", ".", "=", "."], | ||
["\#", ".", ".", "+", ".", ".", ".", "\#", ".", ".", ".", "+", ".", ".", "\#"] | ||
]; | ||
}; |
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.
Wow a board!
|
||
// 7-letter word bonus | ||
if (len == 8) {score = score + 50;} | ||
return score; |
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.
Where did len come from? It looks like a global variable initialized in the for loop. Better that's not used.
Also why are you comparing it with 8?
} | ||
// the shortest of two words with the same score | ||
else if (this.score(word) == this.score(highest) && word.length < highest.length) { | ||
highest = word; |
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.
What about if the words are tied, but one is 7-letters long?
Sorry, forgot to pull this earlier.