You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have probably played the Tic-Tac-Toe game to pass time during school hours. It’s fun when you play with paper and pencil. Here, we have developed a mini project in C Tic Tac Toe game.
4
+
5
+
It is the same noughts and crosses or the Xs and Os, the other names for Tic-Tac-Toe.
6
+
7
+
### Function Used:
8
+
9
+
I have divided this project into many functions, and below is a list of those functions.
10
+
I have only described the gotoxy function in detail.
11
+
Just go through the source code once, and other functions used are simple and easy to understand.
12
+
13
+
14
+
-**void menu()** – In this mini project, this function displays the menu or welcome screen of this project.
15
+
-**void go(int n)**
16
+
-**void start_game()**
17
+
-**void check_draw()**
18
+
-**void draw_board()**
19
+
-**void player_first()**
20
+
-**void put_X_O(char ch, int pos)** – This function puts one of the numerical character you input into the respective position in Tic-Tac-Toe.
21
+
22
+
`For example:`
23
+
if you are playing with X and you input 2, the X will go to first row – second column.
24
+
If you want to place X in third row – first column, you have to enter 7.
25
+
And, it is similar for the other positions.
26
+
27
+
-**void gotoxy (int x, int y)** – You need to understand this function as it is one of the most important one used in Tic Tac Toe in C.
28
+
This function allows you to print text in any place of the screen.
0 commit comments