mvprintw(y+25, x, " -----+----+----+----+----+----+----+-----");
}
+static void set_default_colors() {
+
+ init_pair(1, COLOR_WHITE, COLOR_BLACK);
+ attron(COLOR_PAIR(1));
+}
+
static void print_o(int y, int x, unsigned int type) {
if (type == black) {
mvprintw(y, x, "/\\");
mvprintw(y+1, x, "\\/");
/* reset to default */
- init_pair(1, COLOR_WHITE, COLOR_BLACK);
- attron(COLOR_PAIR(1));
+ set_default_colors();
}
/* will be used for pawn placement hints */
mvprintw(y, x, "\\/");
mvprintw(y+1, x,"/\\");
/* reset to default */
- init_pair(1, COLOR_WHITE, COLOR_BLACK);
- attron(COLOR_PAIR(1));
+ set_default_colors();
}
/* y = 1: y -> 0 x = 1: 1 -> 1