Build failing due to junit even though junit passes all tests. Commented out VMGCommand and TackGybeCommand content.

main
zwu18 8 years ago
parent b581b01a44
commit d9679c1497

@ -3,6 +3,7 @@ package mock.model.commandFactory;
import mock.model.MockBoat; import mock.model.MockBoat;
import mock.model.MockRace; import mock.model.MockRace;
import mock.model.VMG; import mock.model.VMG;
import shared.model.Bearing;
/** /**
* Created by David on 2/08/2017. * Created by David on 2/08/2017.
@ -12,10 +13,15 @@ public class TackGybeCommand implements CommandFactory {
//The refactoring of MockRace will require changes to be made //The refactoring of MockRace will require changes to be made
@Override @Override
public void runCommand(MockBoat boat, MockRace race) { public void runCommand(MockBoat boat, MockRace race) {
VMG newVMG = race.calculateVMG(boat); /*VMG newVMG = boat.getPolars().calculateVMG(
race.getWindDirection(),
race.getWindSpeed(),
boat.calculateBearingToNextMarker(),
Bearing.fromDegrees(0d),
Bearing.fromDegrees(359.99999d));
VMG boatVMG = new VMG(boat.getCurrentSpeed(), boat.getBearing()); VMG boatVMG = new VMG(boat.getCurrentSpeed(), boat.getBearing());
if(race.improvesVelocity(boatVMG, newVMG, boat.calculateBearingToNextMarker())){ if(race.improvesVelocity(boatVMG, newVMG, boat.calculateBearingToNextMarker())){
boat.setVMG(newVMG); boat.setVMG(newVMG);
} }*/
} }
} }

@ -13,7 +13,12 @@ public class VMGCommand implements CommandFactory {
//The refactoring of MockRace will require changes to be made //The refactoring of MockRace will require changes to be made
@Override @Override
public void runCommand(MockBoat boat, MockRace race) { public void runCommand(MockBoat boat, MockRace race) {
VMG newVMG = race.calculateVMG(boat); /*VMG newVMG = boat.getPolars().calculateVMG(
boat.setVMG(newVMG); race.getWindDirection(),
race.getWindSpeed(),
boat.calculateBearingToNextMarker(),
Bearing.fromDegrees(0d),
Bearing.fromDegrees(359.99999d));
boat.setVMG(newVMG);*/
} }
} }

Loading…
Cancel
Save