Skip to content

Instantly share code, notes, and snippets.

@joec4i
Created September 2, 2018 22:42
Show Gist options
  • Save joec4i/90a2074f388ff1f0de73109fbca975eb to your computer and use it in GitHub Desktop.
Save joec4i/90a2074f388ff1f0de73109fbca975eb to your computer and use it in GitHub Desktop.
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