Browse Source

Write printBoard function

remotes/origin/Ahmad
fdai7726 11 months ago
parent
commit
177bf0211d
  1. 22
      src/main/c/VierGewinnt.c

22
src/main/c/VierGewinnt.c

@ -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");
}
Loading…
Cancel
Save