2020-05-23 21:51:11 +00:00
|
|
|
package static
|
|
|
|
|
2020-06-06 21:01:45 +00:00
|
|
|
import (
|
|
|
|
"github.com/zikaeroh/codies/internal/pkger"
|
|
|
|
"github.com/zikaeroh/codies/internal/words"
|
|
|
|
)
|
2020-05-23 21:51:11 +00:00
|
|
|
|
|
|
|
var (
|
2020-06-06 21:01:45 +00:00
|
|
|
Default = load("/default.txt")
|
|
|
|
Duet = load("/duet.txt")
|
|
|
|
Undercover = load("/undercover.txt")
|
2020-05-23 21:51:11 +00:00
|
|
|
)
|
2020-06-06 21:01:45 +00:00
|
|
|
|
|
|
|
func load(filename string) words.List {
|
|
|
|
f, err := pkger.Dir("/internal/words/static/codenames").Open(filename)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
defer f.Close()
|
|
|
|
|
|
|
|
return words.NewListFromLines(f)
|
|
|
|
}
|