diff --git a/player.go b/player.go index f432360..4f898d8 100644 --- a/player.go +++ b/player.go @@ -56,7 +56,7 @@ func (p *player) recv() { } func (p *player) nudge() { - newPos := move(p.Robot.Position, p.Robot.MoveTo, p.Robot.Stats.Speed, delta) + newPos := v.Move(p.Robot.Position, p.Robot.MoveTo, p.Robot.Stats.Speed, delta) p.Robot.Position.X = newPos.X p.Robot.Position.Y = newPos.Y } @@ -67,7 +67,7 @@ func (p *player) scan() { if player.Robot.Id == p.Robot.Id || player.Robot.Health <= 0 { continue } - dist := distance(player.Robot.Position, p.Robot.Position) + dist := v.Distance(player.Robot.Position, p.Robot.Position) if dist < float64(p.Robot.Stats.ScannerRadius) { s := bot.Scanner{ Position: v.Point2d{