Skip to content

Maple - Faith and Kristina #48

Open
k0axaca wants to merge 14 commits intoAda-C16:masterfrom
k0axaca:master
Open

Maple - Faith and Kristina #48
k0axaca wants to merge 14 commits intoAda-C16:masterfrom
k0axaca:master

Conversation

@k0axaca
Copy link
Copy Markdown

@k0axaca k0axaca commented Sep 27, 2021

No description provided.

Comment thread adagrams/game.py
'''
# 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
Copy Markdown

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

Comment thread adagrams/game.py
# 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
Copy Markdown

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 thread adagrams/game.py
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
Copy Markdown

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.

Comment thread adagrams/game.py
word_score += 10
return word_score

def uses_available_letters(word, letter_bank):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great work

Comment thread adagrams/game.py
return True


def get_highest_word_score(word_list):
Copy link
Copy Markdown

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

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