if(((Hallway)space).getHallwayName() == hallwy){
currHallwy = (Hallway)space;
}
}
}
server.send(currentPlayer, new AvailableMoveMessage(game.getValidMoves(currHallwy), currentPlayer.getCharacter()));
}
}
}else if(event.getMessage() instanceof EndTurnMessage){
if(isServer){
//Move to the next player when we receive this message
this.getNextPlayer();
//TODO: Send available move message? This still needs to be tested
for(Location location : game.getSpaces()){
Player player = location.getPlayer();
if(player != null){
if(player.getUUID().equals(currentPlayer.getUUID())){
server.send(currentPlayer, new AvailableMoveMessage(game.getValidMoves(location), currentPlayer.getCharacter()));
fireTextStatusEvent(new TextStatusEvent(this, "It is now " + currentPlayer.getCharacter() + "'s turn."));
}
}
}
}