Ooh I love Scrabble! I'm excited for this one lol
Oh no, I didn't get to it today! Tomorrow will have to be a double day!
Here is my over engineered solution in Rust!
I broke it down into multiple different Rust strucs and enums! I'm getting more and more familiar with the Rust type system, and breaking down a game like this is great practice!
One thing I slightly added, is the ability to parse multiple word modifiers together! I opted for a (t)(d) syntax do indicate both a triple and double word score. This is possible in Scrabble, so I wanted to include support for it
My solution and test cases is just over 250 lines so here is the link to the source file in Github!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.