src/chess/rules.h

changeset 69
c8f2c280cff7
parent 63
611332453da0
equal deleted inserted replaced
68:b34de5ce7d0e 69:c8f2c280cff7
172 /** 172 /**
173 * Maps a piece to a character. 173 * Maps a piece to a character.
174 * 174 *
175 * Does not work for pawns, scince they don't have a character. 175 * Does not work for pawns, scince they don't have a character.
176 * 176 *
177 * @param piece one of ROOK, KNIGHT, BISHOP, QUEEN, KING 177 * @param piece may have color or additional flags
178 * @return character value for the specified piece 178 * @return character value for the specified piece
179 */ 179 */
180 char getpiecechr(uint8_t piece); 180 char getpiecechr(uint8_t piece);
181
182 /**
183 * Maps a piece to a unicode character sequence.
184 *
185 * The returned unicode is for black pieces.
186 * You may colorize the output by setting the terminal foreground color.
187 *
188 * @param piece the piece to dispaly
189 * @return unicode character sequence for the specified piece
190 */
191 unsigned char* getpieceunicode(uint8_t piece);
181 192
182 /** 193 /**
183 * Checks, if a specified field is covered by a piece of a certain color. 194 * Checks, if a specified field is covered by a piece of a certain color.
184 * 195 *
185 * The out-parameters may both be NULL, but if any of them is set, the other 196 * The out-parameters may both be NULL, but if any of them is set, the other

mercurial