This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<stdlib.h> | |
#include<math.h> | |
#include<time.h> | |
#include<string.h> | |
#include<GLUT/glut.h> | |
int matrix[3][3]; //this matrix stores the x and o and blank box of the game, a value of 0 is blank, 1 is x and 2 is o | |
int playerturn; //playerturn if it is 1 then 1st players turn else if it is 2 then its second players turn | |
int result; //result of the game if it is 0 then draw if it is 1 then player 1 wins if it is 2 then player 2 wins |