Merge request fixes. minor refactor

#story[1246]
This commit is contained in:
William Muir
2017-09-09 12:37:31 +12:00
parent e2bc613c9d
commit 0c956f93c8
@@ -685,7 +685,7 @@ public class GameState implements Runnable {
case ">speed": case ">speed":
try { try {
setSpeedMultiplier(Double.valueOf(words[3])); setSpeedMultiplier(Double.valueOf(words[3]));
broadcastChatter(new ChatterMessage( notifyMessageListeners(new ChatterMessage(
chatterMessage.getMessage_type(), chatterMessage.getMessage_type(),
"SERVER: Speed modifier set to x" + words[3] "SERVER: Speed modifier set to x" + words[3]
)); ));
@@ -695,7 +695,7 @@ public class GameState implements Runnable {
} }
return; return;
case ">finish": case ">finish":
broadcastChatter(new ChatterMessage( notifyMessageListeners(new ChatterMessage(
chatterMessage.getMessage_type(), chatterMessage.getMessage_type(),
"SERVER: Game will now finish" "SERVER: Game will now finish"
)); ));
@@ -703,7 +703,7 @@ public class GameState implements Runnable {
return; return;
} }
} }
broadcastChatter(chatterMessage); notifyMessageListeners(chatterMessage);
} }
@@ -723,10 +723,6 @@ public class GameState implements Runnable {
customizationFlag = false; customizationFlag = false;
} }
public static void broadcastChatter(ChatterMessage chatterMessage) {
notifyMessageListeners(chatterMessage);
}
public static void endRace () { public static void endRace () {
yachts.forEach((id, yacht) -> yacht.setBoatStatus(BoatStatus.FINISHED)); yachts.forEach((id, yacht) -> yacht.setBoatStatus(BoatStatus.FINISHED));
currentStage = GameStages.FINISHED; currentStage = GameStages.FINISHED;