some clean up
Mainly adding some comments, and some function renaming
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user