Advertisement
Larme

Untitled

Jun 9th, 2021
1,288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.41 KB | None | 0 0
  1.     func pointGenerator2(word: String) -> Int {
  2.         for aLetter in word {
  3.             for (key, letters) in Scrabble.scrabblePoints {
  4.                 for i in letters {
  5.                     for j in i {
  6.                         if aLetter == j {
  7.                             points += key
  8.                         }
  9.                     }
  10.                 }
  11.             }
  12.         }
  13.         return points
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement