Version 1.0 #40

Merged
j23f0779 merged 947 commits from development2 into main 2024-12-13 10:26:49 +01:00
Showing only changes of commit 70c821f2ac - Show all commits

View File

@@ -55,9 +55,14 @@ else if (40 > targetIdx && (!piece.getState().equals(PieceState.HOME) || !piece.
//checks if the target-node is not occupied by an own color //checks if the target-node is not occupied by an own color
if (!tartgetNode.isOccupied(activeColor)) { if (!tartgetNode.isOccupied(activeColor)) {
//checks if the targetNode is not occupied or the occupant ha no shield //checks if the targetNode is not occupied or the occupant ha no shield
if (!tartgetNode.isOccupied() || tartgetNode.getOccupant().getShield() != ShieldState.ACTIVE) { if(tartgetNode.isOccupied()) {
return true; return false;
} }
if(tartgetNode.getOccupant().getShield().equals(ShieldState.ACTIVE)) {
System.out.println("Server: targetNode.getOccupant().getShield().equals(ShieldState.ACTIVE"+tartgetNode.getOccupant().getShield().equals(ShieldState.ACTIVE));
return false;
}
return true;
} }
} }
//returns false it the piece can't move //returns false it the piece can't move