Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
![Title](docs/img/mcumax-title.png)
# MCU-MAX

## Overview
MCU-MAX est une bibliothèque C pour la gestion et l’analyse de parties d’échecs, conçue pour être légère, rapide et facilement intégrable dans des projets embarqués ou des applications desktop.

mcu-max is an MCU-optimized C-language chess game engine based on [micro-Max][micro-max-link].
## Fonctionnalités principales

mcu-max comes with an Arduino serial port example, and a UCI chess interface example for testing mcu-max from UCI-compatible chess game GUIs.
- Lecture et écriture de parties au format UCI
- Détection de situations de pat, échec et mat
- Interface avec Arduino (exemples fournis)
- API simple pour l’intégration dans d’autres projets

When running on devices with little memory, you might want to adjust the max depth value to avoid stack overflows.
## Structure du dépôt

Try the [Rad Pro simulator](https://gissio.github.io/radpro-simulator/) (click the right button and select Game at the bottom of the menu) to test mcu-max.
- `src/` : Code source principal de la bibliothèque
- `examples/` : Exemples d’utilisation (Arduino, UCI)
- `docs/` : Documentation et images
- `build/` : Fichiers générés par CMake et Make
- `tests/` : (à compléter) Tests unitaires et d’intégration

## Features
## Installation

* Configurable hashing.
* Configurable node limit.
* Configurable max depth.
* Valid move listing.
* Best-move search termination.
### Prérequis

## Terms of use
- CMake
- Un compilateur C (GCC, Clang, etc.)

mcu-max is freely available and distributed under the MIT license.
### Compilation

[micro-max-link]: https://home.hccnet.nl/h.g.muller/max-src2.html
Dans le dossier racine, exécutez :

```sh
cmake -B build
cmake --build build
```

Les binaires seront générés dans le dossier `build/`.

## Utilisation

### Exemple Arduino

Voir `examples/arduino/mcu-max-serial/mcu-max-serial.ino` pour une intégration sur microcontrôleur.
22 changes: 22 additions & 0 deletions docs/img/detect check chekmate and pat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
```c
// 1. Tester l'échec d'abord
bool in_check = is_in_check(side);

if (in_check) {
// 2. Si en échec, tester le mat
if (is_checkmate(side)) {
// MAT - Partie terminée, défaite
} else {
// ÉCHEC - Doit jouer pour sortir
}
} else {
// 3. Si pas en échec, tester le pat
if (is_stalemate(side)) {
// PAT - Partie terminée, nulle
} else {
// NORMAL - Jeu continue
}
}
```

##
Loading