Created
September 2, 2018 22:42
-
-
Save joec4i/90a2074f388ff1f0de73109fbca975eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
var letterValuesConfig = map[string]int{ | |
"AEIOULNRST": 1, | |
"DG": 2, | |
"BCMP": 3, | |
"FHVWY": 4, | |
"K": 5, | |
"JX": 8, | |
"QZ": 10, | |
} | |
var letterValues = make(map[byte]int) | |
func main() { | |
for str, score := range letterValuesConfig { | |
for i := 0; i < len(str); i++ { | |
fmt.Println(str[i]) | |
letterValues[str[i]] = score | |
} | |
} | |
fmt.Printf("%#v\n", letterValues) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment