float32 -> float64

This commit is contained in:
sm
2014-04-26 15:36:04 -07:00
parent db28bfea11
commit 8f7ef5aa1a
8 changed files with 83 additions and 82 deletions
+4 -4
View File
@@ -65,14 +65,14 @@ type Game struct {
unregister chan *Player
turn int
players_remaining int
width, height float32
width, height float64
maxPoints int
spectators map[*Spectator]bool
sregister chan *Spectator
sunregister chan *Spectator
kill chan bool
repair_hp int
repair_rate float32
repair_rate float64
tick_duration int
stats GameStats
mode GameMode
@@ -87,7 +87,7 @@ type GameMode interface {
}
// NewGame Poplulates a Game struct and starts the bandwidth calculator.
func NewGame(id string, width, height float32, obstacles, tick, maxPoints int, mode string) (*Game, error) {
func NewGame(id string, width, height float64, obstacles, tick, maxPoints int, mode string) (*Game, error) {
bw, err := bandwidth.NewBandwidth(
[]int{1, 10, 60},
1*time.Second,
@@ -263,7 +263,7 @@ func (g *Game) sendUpdate(payload *Boardstate) {
// Filter objects
for _, ob := range g.obstacles {
if ob.distance_from_point(r.Position) < float32(r.Stats.ScannerRadius)+r.ScanCounter {
if ob.distance_from_point(r.Position) < float64(r.Stats.ScannerRadius)+r.ScanCounter {
player_payload.Objects = append(
player_payload.Objects, ob.minify())
}