src/chess/rules.h

changeset 40
47162a7621da
parent 36
ebe0c961e9a6
child 41
a8346dcf7bbf
equal deleted inserted replaced
39:4d3d398ba689 40:47162a7621da
67 #define BQUEEN (BLACK|QUEEN) 67 #define BQUEEN (BLACK|QUEEN)
68 #define BKING (BLACK|KING) 68 #define BKING (BLACK|KING)
69 69
70 typedef uint8_t Board[8][8]; 70 typedef uint8_t Board[8][8];
71 71
72 struct movetimeval {
73 uint64_t tv_sec;
74 int32_t tv_usec;
75 };
76
72 typedef struct { 77 typedef struct {
73 uint8_t piece; 78 uint8_t piece;
74 uint8_t fromfile; 79 uint8_t fromfile;
75 uint8_t fromrow; 80 uint8_t fromrow;
76 uint8_t tofile; 81 uint8_t tofile;
77 uint8_t torow; 82 uint8_t torow;
78 uint8_t promotion; 83 uint8_t promotion;
79 struct timeval timestamp; 84 struct movetimeval timestamp;
80 struct timeval movetime; 85 struct movetimeval movetime;
81 _Bool check; 86 uint8_t check;
82 _Bool capture; 87 uint8_t capture;
83 } Move; 88 } Move;
84 89
85 typedef struct MoveList MoveList; 90 typedef struct MoveList MoveList;
86 91
87 struct MoveList { 92 struct MoveList {
90 }; 95 };
91 96
92 97
93 typedef struct { 98 typedef struct {
94 uint8_t servercolor; 99 uint8_t servercolor;
95 _Bool timecontrol; 100 uint8_t timecontrol;
96 uint16_t time; 101 uint16_t time;
97 uint16_t addtime; 102 uint16_t addtime;
98 } GameInfo; 103 } GameInfo;
99 104
100 typedef struct { 105 typedef struct {

mercurial