Documented command classes
#story[1196]
This commit is contained in:
@@ -8,13 +8,18 @@ import shared.model.GPSCoordinate;
|
||||
import java.util.Observable;
|
||||
|
||||
/**
|
||||
* Created by cbt24 on 7/09/17.
|
||||
* Command class for collisions
|
||||
*/
|
||||
public class CollisionCommand extends ObserverCommand {
|
||||
private GPSCoordinate startingPosition;
|
||||
private Azimuth azimuth;
|
||||
private double distance;
|
||||
|
||||
/**
|
||||
* Constructor for class
|
||||
* @param race race context
|
||||
* @param boat boat controlled by command
|
||||
*/
|
||||
public CollisionCommand(MockRace race, MockBoat boat) {
|
||||
super(race, boat);
|
||||
}
|
||||
|
||||
@@ -7,11 +7,17 @@ import shared.model.Bearing;
|
||||
import java.util.Observable;
|
||||
|
||||
/**
|
||||
* Created by connortaylorbrown on 4/08/17.
|
||||
* Command class for upwind and downwind controls
|
||||
*/
|
||||
public class WindCommand extends ObserverCommand {
|
||||
private int direction;
|
||||
|
||||
/**
|
||||
* Constructor for class
|
||||
* @param race race context
|
||||
* @param boat boat controlled by command
|
||||
* @param upwind if true, downwind if false
|
||||
*/
|
||||
public WindCommand(MockRace race, MockBoat boat, boolean upwind) {
|
||||
super(race, boat);
|
||||
this.direction = upwind? -1 : 1;
|
||||
|
||||
Reference in New Issue
Block a user