src/chess/rules.h

changeset 69
c8f2c280cff7
parent 63
611332453da0
     1.1 --- a/src/chess/rules.h	Wed Aug 29 17:31:36 2018 +0200
     1.2 +++ b/src/chess/rules.h	Tue Sep 18 15:02:08 2018 +0200
     1.3 @@ -174,12 +174,23 @@
     1.4   * 
     1.5   * Does not work for pawns, scince they don't have a character.
     1.6   * 
     1.7 - * @param piece one of ROOK, KNIGHT, BISHOP, QUEEN, KING
     1.8 + * @param piece may have color or additional flags
     1.9   * @return character value for the specified piece
    1.10   */
    1.11  char getpiecechr(uint8_t piece);
    1.12  
    1.13  /**
    1.14 + * Maps a piece to a unicode character sequence.
    1.15 + * 
    1.16 + * The returned unicode is for black pieces.
    1.17 + * You may colorize the output by setting the terminal foreground color.
    1.18 + * 
    1.19 + * @param piece the piece to dispaly
    1.20 + * @return unicode character sequence for the specified piece
    1.21 + */
    1.22 +unsigned char* getpieceunicode(uint8_t piece);
    1.23 +
    1.24 +/**
    1.25   * Checks, if a specified field is covered by a piece of a certain color.
    1.26   * 
    1.27   * The out-parameters may both be NULL, but if any of them is set, the other

mercurial