13 bool colour_is_ok(int colour) {
15 return colour == Black || colour == White;
20 bool colour_is_white(int colour) {
22 ASSERT(colour_is_ok(colour));
24 return colour == White;
29 bool colour_is_black(int colour) {
31 ASSERT(colour_is_ok(colour));
33 return colour == Black;
38 bool colour_equal(int colour_1, int colour_2) {
40 ASSERT(colour_is_ok(colour_2));
42 return (colour_1 & colour_2) != 0;
47 int colour_opp(int colour) {
49 ASSERT(colour_is_ok(colour));
51 return colour ^ (BlackFlag^WhiteFlag);