-
Notifications
You must be signed in to change notification settings - Fork 169
Tigers - Melley #130
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
base: main
Are you sure you want to change the base?
Tigers - Melley #130
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.
Melley, this is really well written. Very solid code and it all works. Well done, you hit the learning goals here.
@@ -1,15 +1,129 @@ | |||
const letterPool = Array(9) |
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.
👍 😀
Y: 4, | ||
Z: 10, | ||
}; | ||
|
||
export const drawLetters = () => { |
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.
👍
adjustedLetterPool.splice(letterIndex, 1); | ||
handList.push(currentLetter); | ||
} | ||
return handList; | ||
}; | ||
|
||
export const usesAvailableLetters = (input, lettersInHand) => { |
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.
👍 Very clear
lettersInHandCount[letter] -= 1; | ||
} | ||
} | ||
return true; | ||
}; | ||
|
||
export const scoreWord = (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.
👍
if (word.length > 6) { | ||
score += 8; | ||
} | ||
return score; | ||
}; | ||
|
||
export const highestScoreFrom = (words) => { |
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.
👍
No description provided.