Renamed obstacle -> obstacle count
This commit is contained in:
+3
-3
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user