Skip to content

Instantly share code, notes, and snippets.

View devkumar326's full-sized avatar
✌️
Focusing

DEV KUMAR devkumar326

✌️
Focusing
  • ghaziabad
View GitHub Profile
@devkumar326
devkumar326 / main.cpp
Created December 3, 2020 18:19 — forked from alyakhtar/main.cpp
Tic-Tac-Toe (OpenGL)
#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