mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Merge branch 'issue_#67_early_start' into 'develop'
added a check in the start logic to make sure a boat can't cross the start line early See merge request !74
This commit is contained in:
@@ -736,6 +736,10 @@ public class GameState implements Runnable {
|
|||||||
* @param yacht The current yacht to check for
|
* @param yacht The current yacht to check for
|
||||||
*/
|
*/
|
||||||
private Boolean checkStartLineCrossing(ServerYacht yacht) {
|
private Boolean checkStartLineCrossing(ServerYacht yacht) {
|
||||||
|
long timeTillStart = System.currentTimeMillis() - this.getStartTime();
|
||||||
|
if (timeTillStart < 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Integer currentMarkSeqID = yacht.getCurrentMarkSeqID();
|
Integer currentMarkSeqID = yacht.getCurrentMarkSeqID();
|
||||||
CompoundMark currentMark = markOrder.getCurrentMark(currentMarkSeqID);
|
CompoundMark currentMark = markOrder.getCurrentMark(currentMarkSeqID);
|
||||||
GeoPoint lastLocation = yacht.getLastLocation();
|
GeoPoint lastLocation = yacht.getLastLocation();
|
||||||
|
|||||||
Reference in New Issue
Block a user