From 5666c09e94662585176ec60adca3292b7479667b Mon Sep 17 00:00:00 2001 From: Emman Mensdorf Date: Mon, 5 Feb 2024 21:56:15 +0100 Subject: [PATCH] Dame bewegung erweiterung schlagen und position einnehmen, Emman Mensdorf --- src/Dame.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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