Joining the Dots
Explore the function call sequence for the Tic-Tac-Toe game.
Visualizing the function calls
Let’s now visualize the function call sequence for the Tic-Tac-Toe game we just created.
Press + to interact
Now let’s dive into an explanation of the diagram provided above:
- The game starts by calling the
startGame()
function.
The startGame()
function
The game starts by calling the startGame()
function. It performs the following tasks:
-
It first initializes the board by calling the
initializeBoard()
function. -
It prompts the user to set the game mode by calling the
getMode()
...