some go fmt

This commit is contained in:
Stephen McQuay 2014-11-24 14:42:38 -08:00
parent f86bacbd69
commit d00e2a8df8
1 changed files with 6 additions and 6 deletions

View File

@ -199,19 +199,19 @@ func (r *Robot) checkCollisions(g *Game, probe v.Vector2d) (bool, *v.Point2d, *R
bounds := []Obstacle{ bounds := []Obstacle{
Obstacle{ Obstacle{
Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.width}}, Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.width}},
Hp: 0, Hp: 0,
}, },
Obstacle{ Obstacle{
Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.height}}, Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.height}},
Hp: 0, Hp: 0,
}, },
Obstacle{ Obstacle{
Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{0, g.height}}, Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{0, g.height}},
Hp: 0, Hp: 0,
}, },
Obstacle{ Obstacle{
Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{g.width, 0}}, Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{g.width, 0}},
Hp: 0, Hp: 0,
}, },
} }
@ -278,13 +278,13 @@ func (r *Robot) Tick(g *Game) {
r.TargetSpeed = r.Stats.Speed r.TargetSpeed = r.Stats.Speed
} }
if r.TargetSpeed < -0.25 * r.Stats.Speed { if r.TargetSpeed < -0.25*r.Stats.Speed {
r.TargetSpeed = -0.25 * r.Stats.Speed r.TargetSpeed = -0.25 * r.Stats.Speed
} }
// Are we speeding up or slowing down? // Are we speeding up or slowing down?
increase := true increase := true
if r.Speed - r.TargetSpeed > v.Epsilon { if r.Speed-r.TargetSpeed > v.Epsilon {
increase = false increase = false
} }