Add support for fixed object geometry
also updated config file
This commit is contained in:
@@ -59,8 +59,9 @@ type Game struct {
|
||||
players map[*Player]bool
|
||||
projectiles map[*Projectile]bool
|
||||
splosions map[*Splosion]bool
|
||||
defaultObstacles []Obstacle
|
||||
obstacles []Obstacle
|
||||
obstacle_count int
|
||||
obstacleCount int
|
||||
register chan *Player
|
||||
unregister chan *Player
|
||||
turn int
|
||||
@@ -87,7 +88,7 @@ type GameMode interface {
|
||||
}
|
||||
|
||||
// NewGame Poplulates a Game struct and starts the bandwidth calculator.
|
||||
func NewGame(id string, width, height float64, obstacles, tick, maxPoints int, mode string) (*Game, error) {
|
||||
func NewGame(id string, width, height float64, tick, maxPoints int, mode string) (*Game, error) {
|
||||
bw, err := bandwidth.NewBandwidth(
|
||||
[]int{1, 10, 60},
|
||||
1*time.Second,
|
||||
@@ -102,8 +103,6 @@ func NewGame(id string, width, height float64, obstacles, tick, maxPoints int, m
|
||||
unregister: make(chan *Player, maxPlayer),
|
||||
projectiles: make(map[*Projectile]bool),
|
||||
splosions: make(map[*Splosion]bool),
|
||||
obstacles: GenerateObstacles(obstacles, width, height),
|
||||
obstacle_count: obstacles,
|
||||
players: make(map[*Player]bool),
|
||||
turn: 0,
|
||||
width: width,
|
||||
|
||||
Reference in New Issue
Block a user