allow object specification

This commit is contained in:
sm
2013-11-16 19:57:13 -08:00
parent f6b3027ded
commit 5a2651d0dd
3 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -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,