allow the control interface to specify game type

This commit is contained in:
Fraser Graham
2014-01-15 22:16:06 -08:00
parent 9583de2ffa
commit 90b7731865
4 changed files with 20 additions and 11 deletions
+9 -6
View File
@@ -18,15 +18,17 @@ type Config struct {
Height int `json:"height"`
Obstacles int `json:"obstacles"`
MaxPoints int `json:"max_points"`
Mode string `json:"mode"`
}
const (
TICK = 60
TIMESCALE = 1.0
WIDTH = 800
HEIGHT = 550
OBSTACLES = 5
MAX_POINTS = 500 // allowing for 50 pts in every category
TICK = 60
TIMESCALE = 1.0
WIDTH = 800
HEIGHT = 550
OBSTACLES = 5
MAX_POINTS = 500 // allowing for 50 pts in every category
DEFAULT_MODE = "deathmatch"
)
func loadConfig(filename string) (Config, error) {
@@ -37,6 +39,7 @@ func loadConfig(filename string) (Config, error) {
Height: HEIGHT,
Obstacles: OBSTACLES,
MaxPoints: MAX_POINTS,
Mode: DEFAULT_MODE,
}
u, err := user.Current()
if err != nil {