src/chess/rules.c

changeset 69
c8f2c280cff7
parent 68
b34de5ce7d0e
--- a/src/chess/rules.c	Wed Aug 29 17:31:36 2018 +0200
+++ b/src/chess/rules.c	Tue Sep 18 15:02:08 2018 +0200
@@ -204,6 +204,18 @@
     }
 }
 
+unsigned char* getpieceunicode(uint8_t piece) {
+    switch (piece & PIECE_MASK) {
+    case PAWN: return "\u265f";
+    case ROOK: return "\u265c";
+    case KNIGHT: return "\u265e";
+    case BISHOP: return "\u265d";
+    case QUEEN: return "\u265b";
+    case KING: return "\u265a";
+    default: return "";
+    }
+}
+
 uint8_t getpiece(char c) {
     switch (c) {
         case 'R': return ROOK;

mercurial