src/chess/bishop.c

changeset 195
27d02ccb0cef
parent 194
619f07c95894
--- a/src/chess/bishop.c	Tue Aug 25 18:59:18 2026 +0200
+++ b/src/chess/bishop.c	Tue Aug 25 19:42:15 2026 +0200
@@ -54,7 +54,7 @@
 }
 
 size_t bishop_moves(const GameState *gamestate,
-        Color c, Rank r, File f, Move *moves) {
+        Color c, File f, Rank r, Move *moves) {
 
     size_t count = 0;
     const int directions[4][2] = {
@@ -75,7 +75,7 @@
             moves[count].fromfile = f;
             moves[count].torank = rank;
             moves[count].tofile = file;
-            moves[count].capture = piece_at(gamestate, rank, file) != 0;
+            moves[count].capture = piece_at(gamestate, file, rank) != 0;
             count++;
 
             rank += directions[i][0];

mercurial