~nromdotcom/gemif

ref: 9b7a8a567d14485941e0fa82d75b91b02d15b5e6 gemif/cmd/gemif/main.go -rw-r--r-- 672 bytes
9b7a8a56Norm MacLennan try switching to protobuf for state tokens 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//go:generate pkger -o cmd/gemif
package main

import (
	"fmt"
	"gemif/pkg/gamemanager"
	"gemif/pkg/web"
	"os"
)

//nolint:gochecknoglobals
var (
	appName    string = "GemIF"
	appVersion string = "0.0.0"
	appCommit  string = "local"
	buildTime  string = "just now!"
)

func main() {
	config, loaderErr := gamemanager.NewConfig("./stories")
	if loaderErr != nil {
		fmt.Printf("Error loading stories! %s", loaderErr)
	}

	gameMgr, err := gamemanager.NewGameManager(config)
	if err != nil {
		fmt.Printf("Error loading game! %s", err)
		os.Exit(1)
	}

	fmt.Printf("Starting %s %s (%s) - built %s\n\n", appName, appVersion, appCommit, buildTime)

	web.StartRouter(gameMgr)
}