Open
Conversation
getting Faith's changes
tgoslee
reviewed
Oct 5, 2021
| ''' | ||
| # use a dictionary with the letter as the key and the number of instances/tiles as the value | ||
| # make a copy of LETTER_POOL (shallow/deep) | ||
| all_letters = LETTER_POOL.copy() |
There was a problem hiding this comment.
making a copy is a great approach and helps prevent side effects with the LETTER_POOL
tgoslee
reviewed
Oct 5, 2021
| # initialize an empty array to hold strings (letters) | ||
| drawn_letters = [] | ||
| # continue loop until the list has ten values | ||
| while len(drawn_letters) < 10: |
There was a problem hiding this comment.
a while loop is another great approach!
tgoslee
reviewed
Oct 5, 2021
Comment on lines
+68
to
+75
| one_point = ['A','E','I','O', 'U', 'L', 'N','R','S','T'] | ||
| two_point = ['D','G'] | ||
| three_point = ['B','C','M','P'] | ||
| four_point = ['F','H','V','W','Y'] | ||
| five_point = ['K'] | ||
| eight_point = ['J','X'] | ||
| ten_point = ['Q', 'Z'] | ||
| # create variable word_score and start at 0 |
There was a problem hiding this comment.
another approach to this would be to create key, value pairs in a dictionary. Then you could use the sum method to find the score and then use lines 78-79 that you already have to find the score of the word.
tgoslee
reviewed
Oct 5, 2021
| word_score += 10 | ||
| return word_score | ||
|
|
||
| def uses_available_letters(word, letter_bank): |
tgoslee
reviewed
Oct 5, 2021
| return True | ||
|
|
||
|
|
||
| def get_highest_word_score(word_list): |
|
Overall great work! I liked seeing how you all approached each function. I left a few comments on the refactoring part of your code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.