allow object specification
This commit is contained in:
@@ -66,14 +66,14 @@ type game struct {
|
||||
winners WinnerMap
|
||||
}
|
||||
|
||||
func NewGame(id string, width, height float32, tick int) *game {
|
||||
func NewGame(id string, width, height float32, obstacles, tick int) *game {
|
||||
g := &game{
|
||||
id: id,
|
||||
register: make(chan *player),
|
||||
unregister: make(chan *player, maxPlayer),
|
||||
projectiles: make(map[*Projectile]bool),
|
||||
splosions: make(map[*Splosion]bool),
|
||||
obstacles: GenerateObstacles(conf.Obstacles, width, height),
|
||||
obstacles: GenerateObstacles(obstacles, width, height),
|
||||
players: make(map[*player]bool),
|
||||
turn: 0,
|
||||
width: width,
|
||||
|
||||
Reference in New Issue
Block a user