class Scrabble
  attr_reader :word

  def initialize(word)
    @word = word.to_s.strip.downcase
  end

  def score
    word.chars.sum { |letter| TILE_POINTS[letter] }
  end

  private

  def self.score(word)
    new(word).score
  end

  TILE_POINTS = {
    'a' => 1,
    'b' => 3,
    'c' => 3,
    'd' => 2,
    'e' => 1,
    'f' => 4,
    'g' => 2,
    'h' => 4,
    'i' => 1,
    'j' => 8,
    'k' => 5,
    'l' => 1,
    'm' => 3,
    'n' => 1,
    'o' => 1,
    'p' => 3,
    'q' => 10,
    'r' => 1,
    's' => 1,
    't' => 1,
    'u' => 1,
    'v' => 4,
    'w' => 4,
    'x' => 8,
    'y' => 4,
    'z' => 10
  }

end

class Scrabble
  attr_reader :word

  def initialize(word)
    @word = word.to_s.strip.upcase
  end

  def score
    word.chars.sum { |letter| TILE_POINTS[letter] }
  end

  def self.score(word)
    new(word).score
  end

  TILE_POINTS = {
    'A' => 1,  'G' => 2,  'M' => 3,  'S' => 1,  'Y' => 4,
    'B' => 3,  'H' => 4,  'N' => 1,  'T' => 1,  'Z' => 10,
    'C' => 3,  'I' => 1,  'O' => 1,  'U' => 1,
    'D' => 2,  'J' => 8,  'P' => 3,  'V' => 4,
    'E' => 1,  'K' => 5,  'Q' => 10, 'W' => 4,
    'F' => 4,  'L' => 1,  'R' => 1,  'X' => 8,
  }

end

Remove private and reformat tiles
Remove private and reformat tiles
