diff --git a/src/Dame.c b/src/Dame.c index 86291e7..28787ed 100644 --- a/src/Dame.c +++ b/src/Dame.c @@ -35,5 +35,13 @@ bool istzugerlaubt_Dame(char** Brett, int startX, int startY, int endX, int endY return false; } } + + char endPosition = Brett[endY][endX]; + if (player == PLAYER_WHITE && isupper(endPosition)) + return false; + if (player == PLAYER_BLACK && islower(endPosition)) + return false; + + return true; } \ No newline at end of file