| 78 } |
78 } |
| 79 } |
79 } |
| 80 |
80 |
| 81 size_t pawn_moves(const GameState *gamestate, |
81 size_t pawn_moves(const GameState *gamestate, |
| 82 Color c, Row r, File f, Move *moves) { |
82 Color c, Row r, File f, Move *moves) { |
| |
83 (void) gamestate; /* no (theoretical) move depends on the game state */ |
| 83 size_t count = 0; |
84 size_t count = 0; |
| 84 int rowdelta = c == WHITE ? 1 : -1; |
85 int rowdelta = c == WHITE ? 1 : -1; |
| 85 int promotionrow = c == WHITE ? 7 : 0; |
86 int promotionrow = c == WHITE ? 7 : 0; |
| 86 int startrow = c == WHITE ? 1 : 6; |
87 int startrow = c == WHITE ? 1 : 6; |
| 87 const int targets[4][3] = { |
88 const int targets[4][3] = { |