summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files changed, 15 insertions, 2 deletions
diff --git a/README.md b/README.md
index 828c355..ccf54a5 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ ChessArbiter is a library that allow you to play chess games in C++. It ensures
- Attacked squares
- Checkmate
- ...
-- More features are coming soon!
+- Support SAN (Short Algebraic Notation) parsing
# How to setup ChessArbiter
ChessArbiter can be used as a shared library in your project.
@@ -28,7 +28,7 @@ Somewhere at the beginning of the file:
#include "ChessArbiter.hpp"
-Start playing:
+Start playing with absolute moves:
ChessArbiter arbiter;
arbiter.Setup("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
@@ -40,6 +40,19 @@ Start playing:
// Game ends
}
+Play with SAN moves:
+
+ ChessArbiter arbiter;
+ arbiter.Setup("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1");
+ std::string move=arbiter.ParseSAN("e4");
+ // See ParseSANPromotion() to handle SAN moves with promotion
+ if(!arbiter.Play(move)){
+ // Handle illegal moves
+ }
+ if(arbiter.IsCheckmate()){
+ // Game ends
+ }
+
See `ChessArbiter.hpp` for more informations on the API.
# CMake Integration