added message contents to the messages
addedn the conentents for all messages regarding the BPMN diagramm and own interpretation. also created an identifier for pieces to be used for network communication between server and client so that they talk about the same piece.
This commit is contained in:
@@ -405,4 +405,17 @@ public void notifyObservers() {
|
||||
observer.update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the piece through its identifier.
|
||||
*
|
||||
* @param identifier the identifier of the piece
|
||||
* @return the piece
|
||||
*/
|
||||
public Piece getPieceThroughIdentifier(String identifier) {
|
||||
String[] parts = identifier.split("-");
|
||||
Color color = Color.valueOf(parts[0]);
|
||||
int index = Integer.parseInt(parts[1]);
|
||||
return board.getPlayerData().get(color).getPieces()[index];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user