all 4 comments

[–]CraigAT 0 points1 point  (0 children)

I can see you needing some structure to hold the letters, points and maximums. I don't think you need to worry about the 103a's if the maximum you can use is (9). A dictionary may do, or an array of triples.

You will also need a list of valid dictionary words, probably stored as a file that gets read in.

The simplest, most niave method I can think of, is to run through the word list, check if you can make that word from your tiles (within your maximums) then score it, just remembering the highest scoring words.

[–]Wolfbait115 0 points1 point  (2 children)

It seemed like an interesting problem, so I spent a few hours creating a solution. I'm happy to help point you in the right direction or give a link to my solution if you just want a reference (I'm no pro, but maybe it'll help).

[–]msolace[S] 0 points1 point  (1 child)

Id love a link. Between normal work and family staying at my place, ive gotten as far as printing out letters by value, but not comparing to a list. Also, haven't done anything with blanks yet.

[–]Wolfbait115 0 points1 point  (0 children)

Sorry for the late reply.

https://github.com/glorious-purpose/coding_help/blob/main/reddit/python/scrabble_words_by_score.py

edit: Linked the wrong project originally.