Add support for fixed object geometry

also updated config file
This commit is contained in:
sm
2014-05-11 21:49:06 -07:00
parent 961cf5d7da
commit c9dfa27320
5 changed files with 54 additions and 10 deletions
+3 -4
View File
@@ -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,