244 * @param color the color of the piece that should cover the field |
244 * @param color the color of the piece that should cover the field |
245 * @return TRUE, if any piece of the specified color threatens the specified |
245 * @return TRUE, if any piece of the specified color threatens the specified |
246 * field and could capture an opponent piece |
246 * field and could capture an opponent piece |
247 */ |
247 */ |
248 #define is_attacked(gamestate, row, file, color) \ |
248 #define is_attacked(gamestate, row, file, color) \ |
249 get_threats(gamestate, row, file, color, NULL, NULL) |
249 get_real_threats(gamestate, row, file, color, NULL, NULL) |
250 |
250 |
251 /** |
251 /** |
252 * Checks, if a specified field is protected by a piece of a certain color. |
252 * Checks, if a specified field is protected by a piece of a certain color. |
253 * |
253 * |
254 * I.e. the field is covered by a piece that is NOT the king AND this piece is |
254 * I.e. the field is covered by a piece that is NOT the king AND this piece is |