Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to write two arguments for function VictoryCheck. This is for a tic tac t

ID: 3643503 • Letter: I

Question

I need to write two arguments for function VictoryCheck. This is for a tic tac toe program in C. ROWS and COLS are 7 and the requirement to win is 3 in a row. It has to check for horizontal, diagnosis down left, diagonal down right and vertical. MARKONE = X MARKTWO = O


int VictoryCheck(int winRequirement, char[ROWS][COLS]);

FUNCTION EXPLANATION
The function should take two arguments. The first argument is a single integer argument that contains the number of adjacent symbols a player must produce to win the game. The second argument should be a two-dimensional array representing the board. The number of adjacent symbols a player needs to produce the win the game is defined in the constant CONSECUTIVE_MARKS_REQUIRED (which is 3). VictoryCheck() should scan through the board and determine if a player has produced the appropriate number of adjacent symbols required to win the game. The adjacent symbols can be oriented in a horizontal, vertical or diagonal fashion. VictoryCheck() should return one of the provided victory codes to the driver (NOWIN, MARKONEVICTORY, MARKTWOVICTORY, TIE, ERROR, EPIC_FAIL.).

Explanation / Answer

#include <stdio.h>