mirror of
https://github.com/cbeimers113/strands.git
synced 2025-12-23 23:27:42 -05:00
32 lines
529 B
Go
32 lines
529 B
Go
package main
|
|
|
|
import (
|
|
_ "embed"
|
|
"fmt"
|
|
"regexp"
|
|
|
|
"cbeimers113/strands/internal/config"
|
|
"cbeimers113/strands/internal/game"
|
|
)
|
|
|
|
//go:embed .version
|
|
var Version string
|
|
|
|
func main() {
|
|
if m := regexp.MustCompile(`^[0-9].[0-9].[0-9](-snapshot)?$`); !m.MatchString(Version) {
|
|
fmt.Printf("Warning: non-semantic version number provided: %s\n", Version)
|
|
}
|
|
|
|
cfg, err := config.Load()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
g, err := game.New(cfg, Version)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
g.Start()
|
|
}
|