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
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 itMy solution and test cases is just over 250 lines so here is the link to the source file in Github!
github.com/coreyja/dev-to-challeng...