Minor commit for testing

#story[1293]
This commit is contained in:
William Muir
2017-09-26 17:19:45 +13:00
parent 7a4cdbe0c9
commit 8ba44d7476
2 changed files with 5 additions and 31 deletions
@@ -382,8 +382,8 @@ public class GameState implements Runnable {
//Get a random token location with random type
Token token = allTokens.get(random.nextInt(allTokens.size()));
token.assignRandomType();
token.assignType(TokenType.WIND_WALKER);
// token.assignRandomType();
token.assignType(TokenType.BUMPER);
logger.debug("Spawned token of type " + token.getTokenType());
@@ -78,7 +78,6 @@ public class ServerToClientThread implements Runnable {
private List<ConnectionListener> connectionListeners = new ArrayList<>();
private DisconnectListener disconnectListener;
private ServerYacht yacht;
private Player player;
public ServerToClientThread(Socket socket) {
@@ -101,33 +100,12 @@ public class ServerToClientThread implements Runnable {
}
private void setUpPlayer(){
BufferedReader fn;
String fName = "";
BufferedReader ln;
String lName = "";
String shortName = "p" + sourceId;
String longName = "player " + sourceId;
fn = new BufferedReader(
new InputStreamReader(
ServerToClientThread.class.getResourceAsStream(
"/server_config/CSV_Database_of_First_Names.csv"
)
)
);
List<String> all = fn.lines().collect(Collectors.toList());
fName = all.get(ThreadLocalRandom.current().nextInt(0, all.size()));
ln = new BufferedReader(
new InputStreamReader(
ServerToClientThread.class.getResourceAsStream(
"/server_config/CSV_Database_of_Last_Names.csv"
)
)
);
all = ln.lines().collect(Collectors.toList());
lName = all.get(ThreadLocalRandom.current().nextInt(0, all.size()));
ServerYacht yacht = new ServerYacht(
BoatMeshType.DINGHY, sourceId, sourceId.toString(), fName, fName + " " + lName, "NZ"
);
BoatMeshType.DINGHY, sourceId, sourceId.toString(), shortName, longName, "NZ");
player = new Player(socket, yacht);
GameState.addYacht(sourceId, yacht);
@@ -318,10 +296,6 @@ public class ServerToClientThread implements Runnable {
return socket;
}
public ServerYacht getYacht() {
return yacht;
}
public void addConnectionListener(ConnectionListener listener) {
connectionListeners.add(listener);
}