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

Jeannie's Scrabble #38

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

Jeannie's Scrabble #38

wants to merge 8 commits into from

Conversation

BJHunnicutt
Copy link

Sorry, forgot to pull this earlier.

Copy link

@CheezItMan CheezItMan left a 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.

[".", "=", ".", ".", ".", "*", ".", ".", ".", "*", ".", ".", ".", "=", "."],
["\#", ".", ".", "+", ".", ".", ".", "\#", ".", ".", ".", "+", ".", ".", "\#"]
];
};

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;

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;

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?

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.

3 participants