Implement the helper functions needed to list the playble shots
[Project_algorithmic_C.git] / lib / debug.c
index e3229901502f1d0da3306b640faa1b57955ef5ef..653207954de9478dab789cbc2aeea90cb6efd9eb 100644 (file)
 
 #include <string.h>
 
+#include "othello.h"
+#include "constants.h"
 #include "debug.h"
 
-void dbg_mvprintw(int base_y, int base_x, const char* fmt, va_list varglist) {
+void display_array(int base_y, int base_x, unsigned int pawn_array[board_size][board_size]) {
 
-    mvprintw(base_y, base_x - strlen(fmt)/2, fmt, varglist);
+    for (int i = 1; i <= board_size; i++) {
+        mvprintw(base_y + i, base_x, "%d", i);
+        for (int j = 1; j <= board_size; j++) {
+            mvprintw(base_y, base_x + j, "%d", j);
+            mvprintw(base_y + i, base_x + j, "%d", get_box_value(i, j, pawn_array));
+        }
+    }
 }
+
+/* void dbg_mvprintv(int y, int x, ) {
+
+} */