added config file support

This commit is contained in:
sm
2013-11-13 20:38:57 -08:00
parent c7d5e4be87
commit aabda1cc90
5 changed files with 110 additions and 36 deletions
+6 -1
View File
@@ -125,7 +125,12 @@ func addPlayer(ws *websocket.Conn) {
if game == nil {
force := *debug
if force {
game = NewGame(gid.Id, float32(*width), float32(*height))
game = NewGame(
gid.Id,
float32(conf.Width),
float32(conf.Height),
conf.Tick,
)
go game.run()
games.add(game)
} else {