Browse Source

Write checkWin function

main^2
fdai7726 11 months ago
committed by Peter Wiebe
parent
commit
f86a5cddc2
  1. 9
      src/main/c/VierGewinnt.c

9
src/main/c/VierGewinnt.c

@ -215,6 +215,15 @@ int checkDiagonalRL(char board[ROWS][COLS], char player) {
} }
} }
return 0; return 0;
}
// Write checkWin function
int checkWin(char board[ROWS][COLS], char player) {
return checkHorizontal(board, player) ||
checkVertical(board, player) ||
checkDiagonalLR(board, player) ||
checkDiagonalRL(board, player);
} }

Loading…
Cancel
Save