...

/

Main Loop Modules

Main Loop Modules

Learn how to implement the play function.

What we have

Here is the snap of our startGame() function.

Press + to interact
void startGame() {
char board[9];
initialize(board);
int gameMode = getMode();
play(board, gameMode);
}

We have completed the first two steps (initialize() and getMode()). Now is the time to look at the play() function in detail.

Requirements of this module

The play() function receives two parameters (board and gameMode) from its caller (startGame). It uses these ...