Skip to content

Conversation

@clementvp
Copy link

This PR adds new functions to the API in mcu-max.h and implements them in mcu-max.c.

mcumax_is_in_check(uint8_t side): Checks if the king of the given side is in check.
mcumax_is_in_checkmate(uint8_t side): Checks if the king of the given side is in checkmate.
mcumax_is_stalemate(uint8_t side): Checks if the king of the given side is in stalemate.
mcumax_get_fen(char* fen_buffer, size_t buffer_size): Exports the current position in FEN format.

These additions improve the engine’s ability to detect game-ending conditions and export the board state for interoperability.

All functions are declared in mcu-max.h and fully implemented in mcu-max.c

…érifier si le roi est en échec. Ajoute également un fichier de test pour le moteur d'échecs MCU-Max.
…et_fen pour exporter la position au format FEN. Améliore la fonction is_in_check avec des commentaires et des optimisations.
…ajoutant des sections sur les fonctionnalités, l'installation et des exemples d'utilisation.
…inclure le préfixe 'mcumax_' afin d'améliorer la clarté et la cohérence du code.
…heck, checkmate, and stalemate verification functions in the files mcu-max.c and mcu-max.h.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant