Implement sailing tests and fix into-the-wind bug

This commit is contained in:
Marc Di Luzio 2020-07-22 23:50:42 +01:00
parent c89c5f6e74
commit 5d80cb2596
2 changed files with 79 additions and 1 deletions

View file

@ -552,7 +552,7 @@ func (w *World) Tick() {
}
// If we've incremented over the current move ticks on the rover, we can try and make the move
if r.MoveTicks >= ticksToMove {
if ticksToMove != 0 && r.MoveTicks >= ticksToMove {
_, err := w.TryMoveRover(n, r.Bearing)
if err != nil {
log.Println(err)