Merge branch 'master' into new_issue#19
# Conflicts: # racevisionGame/src/main/java/visualiser/Controllers/TitleController.java
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package shared.dataInput;
|
||||
|
||||
import network.Messages.Enums.RaceTypeEnum;
|
||||
import shared.model.Boat;
|
||||
import shared.model.CompoundMark;
|
||||
import shared.model.GPSCoordinate;
|
||||
import shared.model.Leg;
|
||||
|
||||
@@ -2,15 +2,11 @@ package shared.dataInput;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
import shared.dataInput.XMLReader;
|
||||
import shared.enums.XMLFileType;
|
||||
import shared.exceptions.InvalidRegattaDataException;
|
||||
import shared.exceptions.XMLReaderException;
|
||||
import shared.model.GPSCoordinate;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ package shared.dataInput;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import shared.enums.XMLFileType;
|
||||
import shared.exceptions.XMLReaderException;
|
||||
|
||||
@@ -93,6 +93,10 @@ public class Boat extends Collider {
|
||||
@Nullable
|
||||
private ZonedDateTime timeAtLastMark;
|
||||
|
||||
/**
|
||||
* The state of the boats sails. True if sails are out.
|
||||
*/
|
||||
private boolean sailsOut = true;
|
||||
|
||||
/**
|
||||
* Constructs a boat object with a given sourceID, name, country/team abbreviation, and polars table.
|
||||
@@ -392,6 +396,13 @@ public class Boat extends Collider {
|
||||
this.timeAtLastMark = timeAtLastMark;
|
||||
}
|
||||
|
||||
public void setSailsOut(boolean sailsOut) {
|
||||
this.sailsOut = sailsOut;
|
||||
}
|
||||
|
||||
public boolean isSailsOut() {
|
||||
return sailsOut;
|
||||
}
|
||||
public void bounce(double repulsionRadius) {
|
||||
Azimuth reverseAzimuth = Azimuth.fromDegrees(getBearing().degrees() - 180d);
|
||||
setPosition(GPSCoordinate.calculateNewPosition(getPosition(), 2 * repulsionRadius, reverseAzimuth));
|
||||
|
||||
Reference in New Issue
Block a user