src/chess/rules.h

changeset 157
07cbfc477b22
parent 154
5336e985bd69
--- a/src/chess/rules.h	Fri Jul 24 15:35:06 2026 +0200
+++ b/src/chess/rules.h	Tue Jul 28 12:58:49 2026 +0200
@@ -110,15 +110,21 @@
 #define PLAYER_NAME_BUFLEN 32
 
 typedef struct {
+    /** optional name of the white player - only used for PGN exports */
+    char wname[PLAYER_NAME_BUFLEN];
+    /** optional name of the black player - only used for PGN exports */
+    char bname[PLAYER_NAME_BUFLEN];
     GameInfo info;
     Board board;
     Move* moves;
-    /** optional name of the white player */
-    char wname[PLAYER_NAME_BUFLEN];
-    /** optional name of the black player */
-    char bname[PLAYER_NAME_BUFLEN];
+    /** starting position in FEN notation */
+    char *fen_start;
+    /** array of subsequent positions in FEN notation.
+     * The capacity and element count are identical to the moves array.
+     */
+    char **fen;
     /** capacity of the move array */
-    unsigned movecapacity;
+    unsigned int movecapacity;
     /** number of (half-)moves (counting BOTH colors) */
     unsigned int movecount;
     /** a premove that shall be evaluated next time it's our turn */

mercurial