src/chess/pawn.c

changeset 163
2a6d83f4677e
parent 160
f87832cba8b8
--- a/src/chess/pawn.c	Thu Jul 30 18:34:15 2026 +0200
+++ b/src/chess/pawn.c	Thu Jul 30 19:17:38 2026 +0200
@@ -30,7 +30,7 @@
 #include "pawn.h"
 #include "rules.h"
 
-bool pawn_chkrules(GameState *gamestate, Move *move) {
+bool pawn_chkrules(const GameState *gamestate, const Move *move) {
     int8_t d = piece_color(move->piece) == WHITE ? -1 : 1;
     
     if (move->torow == (d < 0 ? 7 : 0)) {
@@ -69,7 +69,7 @@
     }
 }
 
-bool pawn_isblocked(GameState *gamestate, Move *move) {
+bool pawn_isblocked(const GameState *gamestate, const Move *move) {
     if (move->torow == move->fromrow + 1 || move->torow == move->fromrow - 1) {
         return piece_at(gamestate, mdst(move)) && !move->capture;
     } else {

mercurial