added a method to check if a player has pieces in his waiting area

This commit is contained in:
Fleischer Hanno
2024-11-17 21:04:13 +01:00
parent 90fb6e4133
commit f69a2a9fda

View File

@@ -136,4 +136,18 @@ public int getIndexInHome(Piece piece) {
}
return -1;
}
/**
* This method returns the homeNodes
*
* @return the homeNodes
*/
public boolean hasPieceInWaitingArea() {
for (Piece piece : waitingArea) {
if (piece != null) {
return true;
}
}
return false;
}
}