VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled.
#Story[1097]
This commit is contained in:
@@ -2,6 +2,7 @@ package mock.model.commandFactory;
|
||||
|
||||
import mock.model.MockBoat;
|
||||
import mock.model.MockRace;
|
||||
import shared.model.Bearing;
|
||||
|
||||
/**
|
||||
* Created by David on 2/08/2017.
|
||||
@@ -28,5 +29,6 @@ public class TackGybeCommand implements Command {
|
||||
if(race.improvesVelocity(boatVMG, newVMG, boat.calculateBearingToNextMarker())){
|
||||
boat.setVMG(newVMG);
|
||||
}*/
|
||||
this.boat.setBearing(Bearing.fromDegrees(360 - boat.getBearing().degrees()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user