|
|
@ -104,3 +104,25 @@ void initializeBoard(char board[ROWS][COLS]) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Write printBoard function |
|
|
|
void printBoard(char board[ROWS][COLS]) { |
|
|
|
clearScreen(); |
|
|
|
printf("\n"); |
|
|
|
|
|
|
|
for (int i = 0; i < ROWS; i++) { |
|
|
|
for (int j = 0; j < COLS; j++) { |
|
|
|
printf("| %c ", board[i][j]); |
|
|
|
} |
|
|
|
printf("|\n"); |
|
|
|
|
|
|
|
for (int j = 0; j < COLS; j++) { |
|
|
|
printf("----"); |
|
|
|
} |
|
|
|
printf("-\n"); |
|
|
|
} |
|
|
|
|
|
|
|
printf(" 1 2 3 4 5 6 7\n\n"); |
|
|
|
} |
|
|
|
|