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

Mary Morrison #26

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

Mary Morrison #26

wants to merge 4 commits into from

Conversation

morrime
Copy link

@morrime morrime commented Nov 18, 2016

Finished wave 1, did part of wave 2. Translating our old project from ruby to javascript went pretty well. I like it....for now. Would have liked to finish wave 2, but went to a VR event last night and a negotiating $$ event earlier this week, so, yeah. I couldn't figure out the syntax to make the score chart an object with numbers as properties and an array of letters as their values. Need more frequent commits for next project!

… returns the total score value for the given word, and adds 50 pts if word is 7 letters
…akes an array of words and scores them then outputs the winning word, also handles ties and 7 letter bonus situations
score: function(word) {
var string = word.toUpperCase(),
score = 0;
for(var i=0; i < string.length; i) {

Choose a reason for hiding this comment

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

I'm not sure if this will work without i++

score = Scrabble.scoreChart[string[i]];
}
if (string.length === 7) {
score = 50;

Choose a reason for hiding this comment

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

I believe this logic should be +50, as opposed to =50

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