Renamed obstacle -> obstacle count

This commit is contained in:
sm
2014-04-26 15:32:14 -07:00
parent 2a9c178ebb
commit db28bfea11
3 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -63,7 +63,7 @@ func (c *Controller) StartGame(w http.ResponseWriter, req *http.Request) {
requested_game_name := c.Idg.Hash()
width, height := float32(c.Conf.Width), float32(c.Conf.Height)
obstacles := 0
obstacleCount := 0
maxPoints := c.Conf.MaxPoints
mode := "deathmatch"
@@ -89,7 +89,7 @@ func (c *Controller) StartGame(w http.ResponseWriter, req *http.Request) {
requested_game_name = cfg.Name
width = float32(cfg.Width)
height = float32(cfg.Height)
obstacles = cfg.Obstacles
obstacleCount = cfg.ObstacleCount
maxPoints = cfg.MaxPoints
mode = cfg.Mode
}
@@ -98,7 +98,7 @@ func (c *Controller) StartGame(w http.ResponseWriter, req *http.Request) {
if g == nil {
log.Printf("Game '%s' non-existant; making it now", requested_game_name)
var err error
g, err = NewGame(requested_game_name, width, height, obstacles, c.Conf.Tick, maxPoints, mode)
g, err = NewGame(requested_game_name, width, height, obstacleCount, c.Conf.Tick, maxPoints, mode)
if err != nil {
log.Printf("problem creating game: %s: %s", requested_game_name, err)
b, _ := json.Marshal(NewFailure("game creation failure"))