added logger

This commit is contained in:
Cedric Beck
2024-12-08 12:50:58 +01:00
parent 4c064cb615
commit 41d6f70d51
3 changed files with 7 additions and 5 deletions

View File

@@ -706,11 +706,13 @@ public void clearSelectable(){
p.unSelect(); p.unSelect();
p.unHighlight(); p.unHighlight();
p.setSelectable(false); p.setSelectable(false);
p.setHoverable(false);
} }
for(PieceControl p : selectableOwnPieces) { for(PieceControl p : selectableOwnPieces) {
p.unSelect(); p.unSelect();
p.unHighlight(); p.unHighlight();
p.setSelectable(false); p.setSelectable(false);
p.setHoverable(false);
} }
for(NodeControl n : outlineNodes){ for(NodeControl n : outlineNodes){
n.deOutline(); n.deOutline();

View File

@@ -204,7 +204,7 @@ public void messageReceived(HostedConnection source, Message message) {
* @param message as the received message as a Message object. * @param message as the received message as a Message object.
*/ */
private void messageReceived(HostedConnection source, ClientMessage message) { 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())); pendingMessages.add(new ReceivedMessage(message, source.getId()));
} }
@@ -279,10 +279,11 @@ public void send(int id, ServerMessage message) {
return; return;
} }
final HostedConnection connection = myServer.getConnection(id); final HostedConnection connection = myServer.getConnection(id);
if (connection != null) if (connection != null){
System.out.println(message.getClass().getName());
connection.send(message); 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
} }
/** /**

View File

@@ -85,7 +85,6 @@ public void received(MoveMessage msg) {
logic.getGame().getPlayerByColor(occ.getColor()).addWaitingPiece(occ); logic.getGame().getPlayerByColor(occ.getColor()).addWaitingPiece(occ);
} }
logic.addNotification(new MovePieceNotification(msg.getPiece().getUuid(), oldIndex, msg.getTargetIndex())); logic.addNotification(new MovePieceNotification(msg.getPiece().getUuid(), oldIndex, msg.getTargetIndex()));
//clear old node //clear old node
logic.getGame().getBoard().getInfield()[logic.getGame().getBoard().getInfieldIndexOfPiece(piece)].clearOccupant(); logic.getGame().getBoard().getInfield()[logic.getGame().getBoard().getInfieldIndexOfPiece(piece)].clearOccupant();
//set new node //set new node