game params

This commit is contained in:
Fraser Graham
2013-11-07 21:00:15 -08:00
parent b01654ec76
commit 3d0eb16f91
3 changed files with 8 additions and 3 deletions
+5 -1
View File
@@ -93,6 +93,8 @@ type game struct {
sregister chan *Spectator
sunregister chan *Spectator
kill chan bool
repair_hp int
repair_rate float32
}
func NewGame(id string, width, height float32) *game {
@@ -102,7 +104,7 @@ func NewGame(id string, width, height float32) *game {
unregister: make(chan *player, maxPlayer),
projectiles: make(map[*Projectile]bool),
splosions: make(map[*Splosion]bool),
obstacles: GenerateObstacles(5, width, height),
obstacles: GenerateObstacles(*obstacle_count, width, height),
players: make(map[*player]bool),
turn: 0,
width: width,
@@ -111,6 +113,8 @@ func NewGame(id string, width, height float32) *game {
sregister: make(chan *Spectator),
sunregister: make(chan *Spectator),
kill: make(chan bool, maxPlayer),
repair_hp: 5,
repair_rate: 3.0,
}
return g
}