Browse Source

some go fmt

Stephen McQuay 4 years ago
parent
commit
d00e2a8df8
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      robot.go

+ 6
- 6
robot.go View File

@@ -199,19 +199,19 @@ func (r *Robot) checkCollisions(g *Game, probe v.Vector2d) (bool, *v.Point2d, *R
199 199
 	bounds := []Obstacle{
200 200
 		Obstacle{
201 201
 			Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.width}},
202
-			Hp: 0,
202
+			Hp:     0,
203 203
 		},
204 204
 		Obstacle{
205 205
 			Bounds: v.AABB2d{A: v.Point2d{0, 0}, B: v.Point2d{0, g.height}},
206
-			Hp: 0,
206
+			Hp:     0,
207 207
 		},
208 208
 		Obstacle{
209 209
 			Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{0, g.height}},
210
-			Hp: 0,
210
+			Hp:     0,
211 211
 		},
212 212
 		Obstacle{
213 213
 			Bounds: v.AABB2d{A: v.Point2d{g.width, g.height}, B: v.Point2d{g.width, 0}},
214
-			Hp: 0,
214
+			Hp:     0,
215 215
 		},
216 216
 	}
217 217
 
@@ -278,13 +278,13 @@ func (r *Robot) Tick(g *Game) {
278 278
 		r.TargetSpeed = r.Stats.Speed
279 279
 	}
280 280
 
281
-	if r.TargetSpeed < -0.25 * r.Stats.Speed {
281
+	if r.TargetSpeed < -0.25*r.Stats.Speed {
282 282
 		r.TargetSpeed = -0.25 * r.Stats.Speed
283 283
 	}
284 284
 
285 285
 	// Are we speeding up or slowing down?
286 286
 	increase := true
287
-	if r.Speed - r.TargetSpeed > v.Epsilon {
287
+	if r.Speed-r.TargetSpeed > v.Epsilon {
288 288
 		increase = false
289 289
 	}
290 290
 

Loading…
Cancel
Save