added a check in the start logic to make sure a boat can't cross the start line prematurely (they will have to go back and go through it again) #fix #refactor

This commit is contained in:
Peter Galloway
2017-09-26 15:25:24 +13:00
parent 1bd4db73cd
commit 870d7a6e82
@@ -581,6 +581,10 @@ public class GameState implements Runnable {
* @param yacht The current yacht to check for
*/
private Boolean checkStartLineCrossing(ServerYacht yacht) {
long timeTillStart = System.currentTimeMillis() - this.getStartTime();
if (timeTillStart < 0){
return false;
}
Integer currentMarkSeqID = yacht.getCurrentMarkSeqID();
CompoundMark currentMark = markOrder.getCurrentMark(currentMarkSeqID);
GeoPoint lastLocation = yacht.getLastLocation();