some clean up

Mainly adding some comments, and some function renaming
This commit is contained in:
sm
2013-09-28 12:59:17 -07:00
parent c5bddcdc31
commit 56c965add7
6 changed files with 47 additions and 38 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func (p *player) recv() {
p.ws.Close()
}
func (p *player) check_collisions(g *game, move_vector v.Vector2d) (bool, v.Point2d) {
func (p *player) checkCollisions(g *game, move_vector v.Vector2d) (bool, v.Point2d) {
collision := false
intersection_point := v.Point2d{X: 0, Y: 0}
@@ -114,7 +114,7 @@ func (p *player) nudge(g *game) {
}
move_vector := new_heading.Scale(p.Robot.Speed * delta)
collision, _ := p.check_collisions(g, move_vector)
collision, _ := p.checkCollisions(g, move_vector)
if collision {
// p.Robot.Position = intersection_point
p.Robot.Speed = 0