diff --git a/game/ai.go b/game/ai.go index 7a317e2..0c8515e 100644 --- a/game/ai.go +++ b/game/ai.go @@ -1,34 +1,5 @@ package game -func chooseCommand(s State, teamID int) command { - t := s.Teams[teamID] - h := ActiveRacer(t) - if collide(h.Position.Pos+1, h.Position.Lane, s) != nil { - if h.Position.Lane <= t.Lane && h.Position.Lane < NumLanes-1 { - return left - } - return right - } - - var nextRacer *Racer - for i, b := range t.Racers { - if b.ID == h.ID+1 { - nextRacer = &t.Racers[i] - break - } - } - - if nextRacer != nil { - if h.Position.Lane != nextRacer.Position.Lane { - if abs(nextRacer.Position.Pos-h.Position.Pos) < h.Kinetics.V { - return slowDown - } - } - } - - return speedUp -} - func smartChooseCommand(s State, teamID int) command { return smartChooseHelper(s, teamID, 2) } diff --git a/game/physics.go b/game/physics.go index a0d4845..190183a 100644 --- a/game/physics.go +++ b/game/physics.go @@ -51,6 +51,6 @@ func collide(pos, lane int, s State) interface{} { const ( baseAccel = 1 MaxA = 1 - MaxV = 2 + MaxV = 3 PassDistance = 2 )