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

Maple - Faith and Kristina #48

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

Maple - Faith and Kristina #48

wants to merge 14 commits into from

Conversation

k0axaca
Copy link

@k0axaca k0axaca commented Sep 27, 2021

No description provided.

'''
# 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()
Copy link

Choose a reason for hiding this comment

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

making a copy is a great approach and helps prevent side effects with the LETTER_POOL

# initialize an empty array to hold strings (letters)
drawn_letters = []
# continue loop until the list has ten values
while len(drawn_letters) < 10:
Copy link

Choose a reason for hiding this comment

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

a while loop is another great approach!

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
Copy link

Choose a reason for hiding this comment

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

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.

word_score += 10
return word_score

def uses_available_letters(word, letter_bank):
Copy link

Choose a reason for hiding this comment

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

great work

else:
return False
return True


def get_highest_word_score(word_list):
Copy link

Choose a reason for hiding this comment

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

great use of max and min methods!

@tgoslee
Copy link

tgoslee commented Oct 5, 2021

Overall great work! I liked seeing how you all approached each function. I left a few comments on the refactoring part of your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants