Daily Challenge (98 Part Series)
Everyone loves a game of Scrabble! Your challenge today is to calculate the scrabble score of a given word.
Scoring per tile:
To make things even more challenging, please consider additional scoring as follows:
Double letter (doubles the value of the letter)
-A double letter will be represented with an asterisk after the letter. he*llo would make a double letter on the e.
Triple letter (triples the value of the letter)
-A triple letter will be represented with two asterisks after the letter. he**llo would make a triple letter on the e.
Double word (double the value of the word after letter rules have been applied)
-A double word is represented by the word ending in (d)
Triple word (triple the value of the word after letter rules have been applied)
-A triple word is represented by the word ending in (t)
A blank (the letter given will score 0)
-A blank tile will be represented with a caret after the letter or asterisk is the letter has a double or triple letter value. hello would mean the e scores 0.
-If the word is a seven letter word an additional 50 points are awarded.
Good luck and happy coding!
This challenge comes from user grantw1991 on Codewars
Want to propose a challenge for a future post? Email email@example.com with your suggestions!