Created class TackGybeCommand which implements the CommandFactory interface.

#story[1097]
main
zwu18 8 years ago
parent b258e94a54
commit 7fc1347377

@ -630,7 +630,6 @@ public class MockRace extends Race {
//Calculate the new VMG. //Calculate the new VMG.
VMG newVMG = this.calculateVMG(boat); VMG newVMG = this.calculateVMG(boat);
//If the new vmg improves velocity, use it. //If the new vmg improves velocity, use it.
if (improvesVelocity(boat, newVMG)) { if (improvesVelocity(boat, newVMG)) {
boat.setVMG(newVMG); boat.setVMG(newVMG);

@ -1,4 +1,7 @@
package mock.model.commandFactory; package mock.model.commandFactory;
import mock.model.MockBoat;
public interface CommandFactory { public interface CommandFactory {
void runCommand(MockBoat boat);
} }

@ -0,0 +1,15 @@
package mock.model.commandFactory;
import mock.model.MockBoat;
/**
* Created by David on 2/08/2017.
*/
public class TackGybeCommand implements CommandFactory {
@Override
public void runCommand(MockBoat boat) {
}
}
Loading…
Cancel
Save