MockBoat: Removed redundant isAutoVMG() function.
TackGybeCommand now disables autoVMG. Removed print statements from VMGCommand.
This commit is contained in:
@@ -23,6 +23,9 @@ public class TackGybeCommand implements Command {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
boat.setAutoVMG(false);
|
||||
|
||||
double boatAngle = boat.getBearing().degrees();
|
||||
double windAngle =race.getWindDirection().degrees();
|
||||
double differenceAngle = calcDistance(boatAngle, windAngle);
|
||||
|
||||
@@ -24,10 +24,8 @@ public class VMGCommand implements Command {
|
||||
public void execute() {
|
||||
if (boat.getAutoVMG()){
|
||||
boat.setAutoVMG(false);
|
||||
System.out.println("Auto VMG off!");
|
||||
} else {
|
||||
boat.setAutoVMG(true);
|
||||
System.out.println("Auto VMG on!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user