diff --git a/src/main/java/seng302/gameServer/GameState.java b/src/main/java/seng302/gameServer/GameState.java index 6256c428..9ac1d61d 100644 --- a/src/main/java/seng302/gameServer/GameState.java +++ b/src/main/java/seng302/gameServer/GameState.java @@ -60,7 +60,7 @@ public class GameState implements Runnable { public static Double windDirection; private static Double windSpeed; - private static Boolean customizationFlag; + private static Boolean customizationFlag; // dirty flag to tell if a player has customized their boat. private static String hostIpAddress; private static List players; @@ -575,16 +575,21 @@ public class GameState implements Runnable { return false; } + /** + * Handles player customization. + * + * @param playerID The ID of the player being modified. + * @param requestType the type of player customization the player wants + * @param customizeData the data related to the customization (color, name, shape) + */ public static void customizePlayer(long playerID, CustomizeRequestType requestType, byte[] customizeData) { - System.out.println(playerID + " " + requestType.toString()); ServerYacht playerYacht = yachts.get((int) playerID); if (requestType.equals(CustomizeRequestType.NAME)) { String name = new String(customizeData); playerYacht.setBoatName(name); } else if (requestType.equals(CustomizeRequestType.COLOR)) { - System.out.println(customizeData.length); int red = customizeData[0] & 0xFF; int green = customizeData[1] & 0xFF; int blue = customizeData[2] & 0xFF; diff --git a/src/main/java/seng302/gameServer/ServerToClientThread.java b/src/main/java/seng302/gameServer/ServerToClientThread.java index 5896b6b9..4062adf8 100644 --- a/src/main/java/seng302/gameServer/ServerToClientThread.java +++ b/src/main/java/seng302/gameServer/ServerToClientThread.java @@ -210,7 +210,7 @@ public class ServerToClientThread implements Runnable, Observer { GameState.customizePlayer(sourceID, requestType, Arrays.copyOfRange(payload, 6, payload.length)); GameState.setCustomizationFlag(); - //// TODO: 17/08/2017 ajm412: Send a response packet here. + // TODO: 17/08/2017 ajm412: Send a response packet here, not really necessary until we do shapes. break; } } else { diff --git a/src/main/resources/css/master.css b/src/main/resources/css/master.css index 7620d831..f79f79f3 100644 --- a/src/main/resources/css/master.css +++ b/src/main/resources/css/master.css @@ -99,6 +99,7 @@ Table -fx-text-fill: black; } +server thread .ui-table .column-header { -fx-background-color: transparent; }