Created class TackGybeCommand which implements the CommandFactory interface.
#story[1097]
This commit is contained in:
@@ -630,7 +630,6 @@ public class MockRace extends Race {
|
||||
//Calculate the new VMG.
|
||||
VMG newVMG = this.calculateVMG(boat);
|
||||
|
||||
|
||||
//If the new vmg improves velocity, use it.
|
||||
if (improvesVelocity(boat, newVMG)) {
|
||||
boat.setVMG(newVMG);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
package mock.model.commandFactory;
|
||||
|
||||
import mock.model.MockBoat;
|
||||
|
||||
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) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user