Write a program that, given a word, computes the scrabble score for that word.
Scrabble.new.score("cabbage")
# => 14
Your program should be in a file named scrabble.rb
.
Letter Value
A, E, I, O, U, L, N, R, S, T 1
D, G 2
B, C, M, P 3
F, H, V, W, Y 4
K 5
J, X 8
Q, Z 10
- You can play a
:double
or a:triple
letter. - You can play a
:double
or a:triple
word.