Category Archives: Games

Python Tic Tac Toe Game

In this tutorial we are going to see how we can implement the tic tac toe game in Python. We can either make use of random numbers for the computer move or we can develop a simple algorithm which will play the role of a computer.  Let us first see the representation of our board.… Read More »

C/C++ TIC-TAC-TOE GAME

This is the main code of my C/C++ TIC-TAC-TOE GAME using the boolean algorithm without calculating all the probability. Using the rand() function to maintain the IA and forcing to play some cases with a chance of 99% , the other 1% is to make the game dynamic (realistic). Custom Cursor Algorithm by using simple… Read More »

Tic-Tac-Toe Game

#include<iostream.h> #include<conio.h> #include<dos.h> #include<process.h> char mat[3][3]; void table(void);            //function to print the table void welcome(void);     //function for welcome screen void main() {  welcome();      A: clrscr();  int i,j,m,n,sum=0;  char ch;  for(m=0;m<3;++m)   for(n=0;n<3;++n)    mat[m][n]=’’;  table();  while(sum<10)  {  //for player 1  cout<<“Player 1 is’x’nChoose the position:”;  cout<<“nRow:”;… Read More »

High/Low Game

#include<iostream.h> #include<conio.h> #include<stdlib.h> #include<process.h> #include<dos.h> void main() { textbackground(WHITE); textcolor(RED);      C: clrscr();  char ch,a[20],ch2;  int num=100,rnum,guess,count,ch1,c=0;  cout<<“nttt******************************”<<“nttt******************************”;  cout<<“nttt**                          **”<<“nttt** Welcome To High/Low Game **”<<“nttt** ________________________ **”;  cout<<“nttt**                          **”<<“nttt******************************”<<“nttt******************************”;  cout<<“nnnn————“<<“n… Read More »