changed the ionput list for selectableMoveNotification

This commit is contained in:
Fleischer Hanno
2024-12-08 22:52:42 +01:00
parent b817af29b5
commit 7256cde020

View File

@@ -41,8 +41,9 @@ public void received(SelectPieceMessage msg) {
//TODO
ArrayList<Piece> pieces = msg.getPieces().stream().map(piece -> logic.getGame().getPieceThroughUUID(piece.getUuid())).collect(Collectors.toCollection(ArrayList::new));
parent.getSelectPiece().setPossiblePieces(pieces);
ArrayList<UUID> listPiece = pieces.stream().map(Piece::getUuid).collect(Collectors.toCollection(ArrayList::new));
LOGGER.log(System.Logger.Level.INFO, "Received " + msg.getPieces().size() + " pieces");
logic.addNotification(new SelectableMoveNotification(pieces.stream().map(Piece::getUuid).collect(Collectors.toCollection(ArrayList::new)), msg.getTargetIndex(), msg.getIsHomeMove()));
logic.addNotification(new SelectableMoveNotification(listPiece, msg.getTargetIndex(), msg.getIsHomeMove()));
parent.setState(parent.getSelectPiece());
}