added logger
This commit is contained in:
@@ -706,11 +706,13 @@ public void clearSelectable(){
|
||||
p.unSelect();
|
||||
p.unHighlight();
|
||||
p.setSelectable(false);
|
||||
p.setHoverable(false);
|
||||
}
|
||||
for(PieceControl p : selectableOwnPieces) {
|
||||
p.unSelect();
|
||||
p.unHighlight();
|
||||
p.setSelectable(false);
|
||||
p.setHoverable(false);
|
||||
}
|
||||
for(NodeControl n : outlineNodes){
|
||||
n.deOutline();
|
||||
|
||||
@@ -204,7 +204,7 @@ public void messageReceived(HostedConnection source, Message message) {
|
||||
* @param message as the received message as a Message object.
|
||||
*/
|
||||
private void messageReceived(HostedConnection source, ClientMessage message) {
|
||||
LOGGER.log(Level.INFO, "message received from {0}: {1}", source.getId(), message); //NON-NLS
|
||||
System.out.println(message.getClass().getName());
|
||||
pendingMessages.add(new ReceivedMessage(message, source.getId()));
|
||||
}
|
||||
|
||||
@@ -279,10 +279,11 @@ public void send(int id, ServerMessage message) {
|
||||
return;
|
||||
}
|
||||
final HostedConnection connection = myServer.getConnection(id);
|
||||
if (connection != null)
|
||||
if (connection != null){
|
||||
System.out.println(message.getClass().getName());
|
||||
connection.send(message);
|
||||
else
|
||||
LOGGER.log(Level.ERROR, "there is no connection with id={0}", id); //NON-NLS
|
||||
}
|
||||
else LOGGER.log(Level.ERROR, "there is no connection with id={0}", id); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -85,7 +85,6 @@ public void received(MoveMessage msg) {
|
||||
logic.getGame().getPlayerByColor(occ.getColor()).addWaitingPiece(occ);
|
||||
}
|
||||
logic.addNotification(new MovePieceNotification(msg.getPiece().getUuid(), oldIndex, msg.getTargetIndex()));
|
||||
|
||||
//clear old node
|
||||
logic.getGame().getBoard().getInfield()[logic.getGame().getBoard().getInfieldIndexOfPiece(piece)].clearOccupant();
|
||||
//set new node
|
||||
|
||||
Reference in New Issue
Block a user