mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Small documentation changes.
tags: #story[1142]
This commit is contained in:
@@ -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<Player> 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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -99,6 +99,7 @@ Table
|
||||
-fx-text-fill: black;
|
||||
}
|
||||
|
||||
server thread
|
||||
.ui-table .column-header {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user