game params
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user