mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed race timer & Added boats to team position list
- Race status messages are sent at regular intervals instead of once at race start - Boat positions are initialised on the Team Position list - Timer counts up from when host clicks ready Tags: #story[377]
This commit is contained in:
@@ -25,7 +25,10 @@ public class GameState implements Runnable {
|
||||
private static Map<Integer, Yacht> yachts;
|
||||
private static Boolean isRaceStarted;
|
||||
private static GameStages currentStage;
|
||||
|
||||
|
||||
private static long startTime = System.currentTimeMillis();
|
||||
|
||||
|
||||
public GameState(String hostIpAddress) {
|
||||
windDirection = 170d;
|
||||
windSpeed = 10000d;
|
||||
@@ -79,9 +82,17 @@ public class GameState implements Runnable {
|
||||
}
|
||||
|
||||
public static void setCurrentStage(GameStages currentStage) {
|
||||
if (currentStage == GameStages.RACING){
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
GameState.currentStage = currentStage;
|
||||
}
|
||||
|
||||
public static long getStartTime(){
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public static Double getWindDirection() {
|
||||
return windDirection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user