2 * =====================================================================================
6 * Description: Routines to handle the user interface
9 * Created: 24/04/2017 16:41:15
13 * Author: Jerome Benoit (fraggle), jerome.benoit@piment-noir.org
14 * Organization: Piment Noir
16 * =====================================================================================
23 /* in all print routine, y and x are the coordinates of the first character of the shape
24 * which can be a space ' ' */
26 /* FIXME: one can split this shape in building blocks and build it using them */
27 void print_board(int y
, int x
) {
29 mvprintw(y
, x
, " | |");
30 mvprintw(y
+1, x
, " | |");
31 mvprintw(y
+2, x
, "----+----+----");
32 mvprintw(y
+3, x
, " | |");
33 mvprintw(y
+4, x
, " | |");
34 mvprintw(y
+5, x
, "----+----+----");
35 mvprintw(y
+6, x
, " | |");
36 mvprintw(y
+7, x
, " | |");
39 static void print_x(int y
, int x
) {
41 mvprintw(y
, x
, "\\/");
42 mvprintw(y
+1, x
,"/\\");
45 static void print_o(int y
, int x
) {
47 mvprintw(y
, x
, "/\\");
48 mvprintw(y
+1, x
, "\\/");
51 /* y: 1 -> +0 x: 1 -> +1
54 static int remap_y(int y
) {
65 static int remap_x(int x
) {