SlideShare a Scribd company logo
See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/383415464
TICTACTOE GAME MANAGEMENT SYSTEM PROJECT REPORT.
Research Proposal · August 2023
DOI: 10.13140/RG.2.2.24010.17605
CITATIONS
0
READS
330
1 author:
Kamal Acharya
Tribhuvan University
248 PUBLICATIONS 4,437 CITATIONS
SEE PROFILE
All content following this page was uploaded by Kamal Acharya on 26 August 2024.
The user has requested enhancement of the downloaded file.
1 | P a g e
AN
INTERNSHIP REPORT
ON
TICTACTOE GAME MANAGEMENT SYSTEM
PROJECT
BY
KAMAL ACHARYA
(Tribhuvan University)
Date: 2023/08/27
2 | P a g e
CHAPTER-1
INTRODUCTION
1.1 INTRODUCTION TO COMPUTER GRAPHICS:
Computer Graphics is concerned with all aspects of producing pictures or images using a
computer. We can create images that are indistinguishable from photographs of real objects. In
other terms, Computer Graphics are the graphics created by the computers, and more generally,
the representation and manipulation of image data by a computer. The development of computer
graphics has been driven both by the needs of the user community and by advances in hardware
and software.
Typically, the term Computer Graphics refers to several different things;
i. The representation and manipulation of image data by a computer.
ii. The various technologies used to create and manipulate images.
iii. The images so produced, and manipulating visual content.
1.2 HISTORY OF COMPUTER GRAPHICS:
The phrase Computer Graphics was coined in 1960 by William Fetter, a graphic designer
for Boeing. The field of Computer Graphics developed with the emergence of computer graphics
hardware. Early projects like the Whirlwind and SAGE projects introduced the CRT as a viable
display and interaction interface and introduced the light pen as an input device. Further
advances in computing led to greater advancements in interactive computer graphics. In 1959,
the TX-2 computer was developed at MIT Lincoln Laboratory. A light pen could be used to draw
sketches on the computer using Ivan Sutherland’s revolutionary Sketchpad software.
Also in 1961 another student at MIT, Steve Russell, created the first video game, Space
war. E. E. Zajac, a scientist at Bell Telephone Laboratory (BTL), created a film called
“Simulation of a two-giro gravity attitude control system” in 1963. In this computer generated
film, Zajac showed how the attitude of a satellite could be altered as it orbits the Earth. Many of
the most important early breakthroughs in computer graphics research occurred at the University
of Utah in the 1970s.
The first major advance in 3D computer graphics was created at UU by these early
pioneers, the hidden-surface algorithm. In order to draw a representation of a 3D object on the
3 | P a g e
screen, the computer must determine which surfaces are “behind” the object from the viewer’s
perspective, and thus should be “hidden” when the computer creates (or renders) the image.
Graphics and application processing were increasingly migrated to the intelligence in the
workstation, rather than continuing to rely on central mainframe and mini-computers. 3D
graphics became more popular in the 1990s in gaming, multimedia and animation. Computer
graphics used in films and video games gradually began to be realistic to the point of entering the
uncanny valley. Examples include the later Final Fantasy games and animated films like The
Polar Express.
1.3 INTRODUCTION TO OpenGL:
OpenGL is a software interface to graphics hardware. This interface consists of about 150
distinct commands that are used to specify the objects and operations needed to produce
interactive three-dimensional applications. OpenGL is designed as a streamlined hardware
independent interface to be implemented on many different hardware platforms.
These are certain characteristics of OpenGL;
 OpenGL is a better documented API.
 OpenGL is much easier to learn and program.
 OpenGL has the best demonstrated 3D performance for any API.
The OpenGL specification describes an abstract API for drawing 2D and 3D graphics.
Although it's possible for the API to be implemented entirely in software, it's designed to be
implemented mostly or entirely in hardware.
In addition to being language-independent, OpenGL is also platform-independent. The
specification says nothing on the subject of obtaining, and managing, an OpenGL context,
leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is
purely concerned with rendering, providing no APIs related to input, audio, or windowing.
OpenGL is an evolving API. New versions of the OpenGL specification are regularly
released by the Khronos Group, each of which extends the API to support various new features.
In addition to the features required by the core API, GPU vendors may provide additional
functionality in the form of extensions.
Extensions may introduce new functions and new constants, and may relax or remove
restrictions on existing OpenGL functions. Vendors can use extensions to expose custom APIs
without needing support from other vendors or the Khronos Group as a whole, which greatly
increases the flexibility of OpenGL. All extensions are collected in, and defined by, the OpenGL
Registry.
4 | P a g e
Fig. 1.3: OpenGL Pipeline.
1.4 INTRODUCTION TO GLUT:
GLUT is the OpenGL utility toolkit, a window system independent toolkit for writing
OpenGL programs. It implements a simple windowing API for OpenGL. GLUT makes it easier
to learn about and explore OpenGL programming. GLUT provides a portable API so you can
write a single OpenGL program that works across all PC and workstation OS platforms. GLUT
is designed for constructing small to medium sized OpenGL programs.
While GLUT is well-suited to learning OpenGL and developing simple OpenGL
applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated
user interfaces are better off using native window system toolkits. The GLUT library has both C,
C++ (same as C), FORTRAN, and ADA programming bindings. The GLUT source code
distribution is portable to nearly all OpenGL implementations and platforms.
Fig. 1.4: Library Organization of OpenGL.
5 | P a g e
1.5 APPLICATIONS OF COMPUTER GRAPHICS:
The development of computer graphics has been driven both by the needs of the user
community and by advances in hardware and software. The applications of computer graphics
are many and varied. We can however divide them into four major areas;
 DISPLAY OF INFORMATION: More than 4000 years ago, the Babylonians developed
floor. plans of buildings on stones. Today, the same type of information is generated by
architects using computers. Over the past 150 years, workers in the field of statistics have
explored techniques for generating plots. Now, we have computer plotting packages.
Supercomputers now allow researchers in many areas to solve previously intractable
problems. Thus, Computer Graphics has innumerable applications.
 DESIGN: Professions such as engineering and architecture are concerned with design.
Today, the use of interactive graphical tools in CAD, in VLSI circuits, characters for
animation have developed in a great way.
 SIMULATION AND ANIMATION: One of the most important uses has been in pilots‟
training. Graphical flight simulators have proved to increase safety and reduce expenses.
Simulators can be used for designing robots, plan it’s path, etc. Video games and
animated movies can now be made with low expenses.
 USER INTERFACES: Our interaction with computers has become dominated by a visual
paradigm. The users’ access to internet is through graphical network browsers. Thus
Computer Graphics plays a major role in all fields.
1.6 APPLICATIONS OF OpenGL:
 OpenGL (Open Graphics Library)is a cross-language, multi-platform API for rendering
2D and 3D computer graphics.
 The API is typically used to interact with a GPU, to achieve hardware accelerated
rendering.
 It is widely used in CAD, virtual reality, scientific visualization, information
visualization, flight simulation, and video games.
6 | P a g e
1.7 OpenGL PRIMITIVES:
OpenGL supports two classes of primitives;
i. Geometric Primitives.
ii. Image(Raster) Primitives.
Geometric primitives are specified in the problem domain and include points, line segments,
polygons, curves and surfaces.
Raster primitives, such as arrays of pixels pass through a separate parallel pipeline on their
way to the frame buffer.
There are ten basic OpenGL primitives;
Fig. 1.7: OpenGL Primitives.
7 | P a g e
CHAPTER-2
REQUIREMENT SPECIFICATION
The graphics editor has been programmed in C. It makes use of Turbo C Graphics library
package for creating the user interface. This is a subroutine library for terminal independent
screen painting and input event handling.
2.1 HARDWARE REQUIREMENTS:
The standard output device is assumed to be a Color Monitor. It is quite essential for any
graphics package to have this, as provision of color options to the user is a must. The mouse, the
main input device, has to be functional i.e. used to give input in the game. A keyboard is used for
controlling and inputting data in the form of characters, numbers i.e. to change the user views.
Minimum Requirements expected are cursor movement, creating objects like lines, squares,
rectangles, polygons, etc. Transformations on objects/selected area should be possible. Filling of
area with the specified color should be possible.
i. Processor: Intel dual core i5.
ii. RAM: 1GB RAM or above.
iii. Input devices: Keyboard.
iv. Output devices: Monitor.
2.2 SOFTWARE REQUIREMENTS:
The editor has been implemented on the OpenGL platform and mainly requires the
appropriate version of Microsoft Visual Studio.
i. Operating System: Microsoft Windows 10.
ii. Microsoft Visual Studio 2010.
iii. glut.h header file.
iv. glut.dll library file.
8 | P a g e
CHAPTER-3
ABOUT THE PROJECT
It is the same noughts and crosses or the Xs and Os, the other names for Tic-Tac-Toe,
you’ve played with paper and pencil. This mini game project is written in C language in a very
simple manner; it is complete and totally error-free.
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-
a simple console application with graphics.
This Tic-Tac-Toe game in C is compiled in Code::Blocks with gcc compiler. The source code is
not that long; it is about 400 lines.
While making a Tic-Tac-Toe game using C language, it is important to make use of arrays. The
Xs and Os are kept in different arrays, and they are passed between several functions in the code
to keep track of how the game goes. With the code here you can play the game choosing either X
or O against the computer.
This Tic-Tac-Toe C game is such that you will have to input a numerical character, from 1 to 9,
to select a position for X or O into the space you want. For example: if you are playing with O
and you input 2, the O will go to first row – second column. If you want to place O in third row –
first column, you have to enter 7. And, it is similar for the other positions.
9 | P a g e
CHAPTER-4
DESIGN
Design of the project includes the initialization and the flow in which the project works.
The initialization involves the use of mouse and keyboard functions. Flow of control includes the
working pattern of the project.
INITIALIZATION:
1. The game is to be played between two people (in this program between HUMAN and
COMPUTER).
2. One of the player chooses “O” and the other “X” to mark their respective cells.
3. The game starts with one of the players and the game ends when one of the players has
one whole row/ column/ diagonal filled with his/her respective character (“O” or “X”).
4. If no one wins, then the game is said to be draw.
FLOW OF CONTROL:
A board game (such as Tic-tac-toe) is typically programmed as a state machine.
Depending on the current-state and the player's move, the game goes into the next-state. In this
example, I use a variable currentState to keep track of the current-state of the game, and define
named-constants to denote the various states of the game (PLAYING, DRAW,
CROSS_WON, and NOUGHT_WON). A method called updateGame() is defined, which will be
called after every move to update this currentState, by checking the status of the game-board.
Two methods are defined for printing the game board, printBoard() and
printCell(). The printBoard() shall call printCell() to print each of the 9 cells. This seems trivial
here, but will be useful in the object-oriented design to separate the board and cells into separate
classes.
10 | P a g e
FLOWCHART:
Fig. 4.1: Flowchart of Tic-Tac-Toe Working.
11 | P a g e
CHAPTER-5
IMPLEMENTATION
5.1 BUILT-IN FUNCTIONS:
1) glColor3f() - Used to display color.
2) glBegin() - Used to accept a single argument.
3) glVertex2f() - Used to specify a line a line, point.
4) glutPostRedisplay() - Marks the current window as needing to be redisplayed.
5) glClearColor(0.0,0.0,0.0,0.0) - Specifies clear values for the color buffers.
6) glEnable(GL_DEPTH_TEST) - Enables the OpenGL capabilities, Specifies the
conditions under which the pixels will be drawn.
7) glLoadIdentity() - Replaces current matrix with identity matrix.
8) glViewport() - Sets the view port.
9) glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB) - Sets the initial display mode.
10) glutInitWindowSize(500,500) and glutInitWindowPosition(50,50) - Set the initial
window size and position respectively.
11) glutCreateWindow() - Creates a top level window with the window name as specified.
12) glutDisplayFunc(display) - Sets the display call back for the current window.
13) glutReshapeFunc(reshape) - Sets the reshape call back for the current window.
14) glutMainLoop() - Enters the GLUT event processing loop. This routine should be called
atmost once in a GLUT program. Once called, this routine will never return. It will calls
necessary any callbacks that have been registered.
12 | P a g e
5.2 SOURCE CODE:
// Tic Tac Toe or X's and O's.
// Keyboard input
// 'v' = view ortho/perspective
// 'l' = lighting on/of
#include <GL/glut.h> // glut (gl utility toolkit) basic windows functions, keyboard, mouse.
#include <stdio.h> // standard (I/O library)
#include <stdlib.h> // standard library (set of standard C functions
#include <math.h> // Math library (Higher math functions )
#include<string.h>
// lighting
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightPosition[]= { 5.0f, 25.0f, 5.0f, 1.0f };
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
int abc=0;
// mouse variables: Win = windows size, mouse = mouse position
int mouse_x, mouse_y, Win_x, Win_y, object_select;
// state variables for Orho/Perspective view, lighting on/off
static int view_state = 0, light_state = 0;
// Use to spin X's and O's
int spin, spinboxes;
// Win = 1 player wins, -1 computer wins, 2 tie.
// player or computer; 1 = X, -1 = O
// start_game indicates that game is in play.
int player, computer, win, start_game;
// alingment of boxes in which one can win
// We have 8 posiblities, 3 accross, 3 down and 2 diagnally
//
// 0 | 1 | 2
// 3 | 4 | 5
// 6 | 7 | 8
//
// row, colunm, diagnal information
static int box[8][3] = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {0, 3, 6},
{1, 4, 7}, {2, 5, 8}, {0, 4, 8}, {2, 4, 6}};
// Storage for our game board
// 1 = X's, -1 = O's, 0 = open space
int box_map[9];
// center x,y location for each box
int object_map[9][2] = {{-6,6},{0,6},{6,6},{-6,0},{0,0},{6,0},{-6,-6},{0,-6},{6,-6}};// quadric
pointer for build our X
GLUquadricObj *Cylinder;
// Begin game routine
void init_game(void)
13 | P a g e
{
int i;
// Clear map for new game
for( i = 0; i < 9; i++)
{
box_map[i] = 0;
}
// Set 0 for no winner
win = 0;
start_game = 1;
}
// Check for three in a row/colunm/diagnal
// returns 1 if there is a winner
int check_move( void )
{
int i, t = 0;
//Check for three in a row
for( i = 0; i < 8; i++)
{
t = box_map[box[i][0]] + box_map[box[i][1]] + box_map[box[i][2]];
if ( (t == 3) || ( t == -3) )
{
spinboxes = i;
return( 1 );
}
}
t = 0;
// check for tie
for( i = 0; i < 8; i++)
{
t = t + abs(box_map[box[i][0]]) + abs( box_map[box[i][1]]) + abs( box_map[box[i][2]]);
}
if ( t == 24 ) return( 2 );
return( 0 );
}
// Do we need to block other player?
int blocking_win(void){
int i, t;
for( i = 0; i < 8; i++)
{
t = box_map[box[i][0]] + box_map[box[i][1]] + box_map[box[i][2]];
if ( (t == 2) || ( t == -2) )
{
// Find empty
if (box_map[box[i][0]] == 0) box_map[box[i][0]] = computer;
if (box_map[box[i][1]] == 0) box_map[box[i][1]] = computer;
14 | P a g e
if (box_map[box[i][2]] == 0) box_map[box[i][2]] = computer;
return( 1 );
}
}
return( 0 );
}
// check for a free space in corner
int check_corner(void)
{
int i;
if ( box_map[0] == 0)
{
box_map[0] = computer;
i = 1;
return( 1 );
}
if ( box_map[2] == 0)
{
box_map[2] = computer;
i = 1;
return( 1 );
}
if ( box_map[6] == 0)
{
box_map[6] = computer;
i = 1;
return( 1 );
}
if ( box_map[8] == 0)
{
box_map[8] = computer;
i = 1;
return( 1 );
}
return( 0 );
}// Check for free space in row
int check_row(void)
{
if ( box_map[4] == 0)
{
box_map[4] = computer;
return( 1 );
}
if ( box_map[1] == 0)
{
box_map[1] = computer;
15 | P a g e
return( 1 );
}
if ( box_map[3] == 0)
{
box_map[3] = computer;
return( 1 );
}
if ( box_map[5] == 0)
{
box_map[5] = computer;
return( 1 );
}
if ( box_map[7] == 0)
{
box_map[7] = computer;
return( 1 );
}
return( 0 );
}
// logic for computer's turn
int computer_move()
{
if ( blocking_win() == 1) return( 1 );
if ( check_corner() == 1) return( 1 );
if ( check_row() == 1) return( 1);
return( 0 );
}
// I use this to put text on the screen
void Sprint( int x, int y, char *st)
{
int l,i;
l=strlen( st ); // see how many characters are in text string.glRasterPos2i( x, y); // location to start
printing text
for( i=0; i < l; i++) // loop until i is greater then l
{
glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, st[i]); // Print a character on the
screen
}
}
// This creates the spinning of the cube.
static void TimeEvent(int te)
{
spin++; // increase cube rotation by 1
if (spin > 360) spin = 180; // if over 360 degress, start back at zero.
glutPostRedisplay(); // Update screen with new rotation data
glutTimerFunc( 8, TimeEvent, 1); // Reset our timmer.
16 | P a g e
}
// Setup our Opengl world, called once at startup.
void init(void)
{
glClearColor (0.6,0.6,0.4,0.0); // When screen cleared, use black.
glShadeModel (GL_SMOOTH); // How the object color will be rendered smooth or flat
glEnable(GL_DEPTH_TEST); // Check depth when rendering
// Lighting is added to scene
glLightfv(GL_LIGHT1 ,GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT1 ,GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT1 ,GL_POSITION, LightPosition);
glEnable(GL_LIGHTING); // Turn on lighting
glEnable(GL_LIGHT1); // Turn on light 1
start_game = 0;
win = 0;
// Create a new quadric
Cylinder = gluNewQuadric();
gluQuadricDrawStyle( Cylinder, GLU_FILL );
gluQuadricNormals( Cylinder, GLU_SMOOTH );
gluQuadricOrientation( Cylinder, GLU_OUTSIDE );
}
void Draw_O(int x, int y, int z, int a)
{
glPushMatrix();
glTranslatef(x, y, z);
glRotatef(a, 1, 0, 0);
glutSolidTorus(0.5, 2.0, 8, 16);glPopMatrix();
}
void Draw_X(int x, int y, int z, int a)
{
glPushMatrix();
glTranslatef(x, y, z);
glPushMatrix();
glRotatef(a, 1, 0, 0);
glRotatef(90, 0, 1, 0);
glRotatef(45, 1, 0, 0);
glTranslatef( 0, 0, -3);
gluCylinder( Cylinder, 0.5, 0.5, 6, 16, 16);
//glutSolidCone( 2.5, 3.0, 16, 8 );
glPopMatrix();
glPushMatrix();
glRotatef(a, 1, 0, 0);
glRotatef(90, 0, 1, 0);
glRotatef(315, 1, 0, 0);
glTranslatef( 0, 0, -3);
gluCylinder( Cylinder, 0.5, 0.5, 6, 16, 16);
17 | P a g e
//glutSolidCone( 2.5, 3.0, 16, 8 );
glPopMatrix();
glPopMatrix();
}
// Draw our world
void display(void)
{
if(abc==3)
{
//int mk=0;
// glColor3f(0.0,1.0,0.0);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen
glColor3f(0.0,1.0,0.0);
glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix
work
glLoadIdentity(); // Clear the matrix
glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view
glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix
work. (drawing)
glLoadIdentity(); // Clear the model matrix
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);
glColor3f(0.0, 0.0, 1.0);Sprint(-2, 0, "Project by");
Sprint(-2, -1, "Gajanan and Nitin");
Sprint(-3, -2, "To Start press right button");
Sprint(-3, -3, "right button for X's");
Sprint(-3, -4, "and left for O's");
glutSwapBuffers();
}
else if(abc==0)
{
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen
glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix work
glLoadIdentity(); // Clear the matrix
glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view
glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix work.
(drawing)
glLoadIdentity(); // Clear the model matrix
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);
glColor3f(0.0, 0.0, 1.0);
Sprint(-4, 0, "Project by Gajanana G Bhat and Nitin Kulkarni");
Sprint(-3, -1, "Right Click to Start the Game");
glutSwapBuffers();
}
else
18 | P a g e
{
//char txt[30];
int ix, iy;
int i;
int j;
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen
glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix work
glLoadIdentity(); // Clear the matrix
glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view
glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix work.
(drawing)
glLoadIdentity(); // Clear the model matrix
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_LIGHTING);
glColor3f(1.0, 0.0, 0.0);
/*if ( start_game == 0 )
{
Sprint(-2, 0, "ggb and kittu");
Sprint(-3, -1, "To Start press");
Sprint(-3, -2, "right button for X's");
Sprint(-3, -3, "and left for O's"); }
*/
if (win == 1) Sprint( -2, 1, "congratulations you win");
if (win == -1) Sprint( -2, 1, "Computer win");
if (win == 2) Sprint( -2, 1, "Tie");
// Setup view, and print view state on screen
if (view_state == 1)
{
glColor3f( 0.0, 0.0, 1.0);
Sprint(-3, 8, "Perspective view");
glMatrixMode (GL_PROJECTION);
glLoadIdentity();
gluPerspective(60, 1, 1, 30);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}else
{
glColor3f( 1.0, 0.0, 0.0);
Sprint(-2, 8, "Ortho view");
}
// Lighting on/off
if (light_state == 1)
{
glDisable(GL_LIGHTING);
glDisable(GL_COLOR_MATERIAL);
}else
19 | P a g e
{
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
}
gluLookAt( 0, 0, 20, 0, 0, 0, 0, 1, 0);
// Draw Grid
for( ix = 0; ix < 4; ix++)
{
glPushMatrix();
glColor3f(1,1,1);
glBegin(GL_LINES);
glVertex2i(-9 , -9 + ix * 6);
glVertex2i(9 , -9 + ix * 6 );
glEnd();
glPopMatrix();
}
for( iy = 0; iy < 4; iy++ )
{
glPushMatrix();
glColor3f(1,1,1); glBegin(GL_LINES);
glVertex2i(-9 + iy * 6, 9 );
glVertex2i(-9 + iy * 6, -9 );
glEnd();
glPopMatrix();
}
glColorMaterial(GL_FRONT, GL_AMBIENT);
glColor4f(0.5, 0.5, 0.5, 1.0);
glColorMaterial(GL_FRONT, GL_EMISSION);
glColor4f(0.0, 0.0, 0.0, 1.0 );
glColorMaterial(GL_FRONT, GL_SPECULAR);
glColor4f(0.35, 0.35, 0.35, 1.0);
glColorMaterial(GL_FRONT, GL_DIFFUSE);
glColor4f(0.69, 0.69, 0.69, 1.0);
//glDisable(GL_COLOR_MATERIAL);
glColor3f( 0.0, 0.0, 0.0); // Cube color
//glEnable(GL_COLOR_MATERIAL);
// Draw object in box's
for( i = 0; i < 9; i++)
{
j = 0;
if (abs( win ) == 1 )
{
if ( (i == box[spinboxes][0]) || (i == box[spinboxes][1]) || (i == box[spinboxes][2]))
{
j = spin;
}else j = 0;
20 | P a g e
}
if(box_map[i] == 1) Draw_X( object_map[i][0], object_map[i][1], -1, j);
if(box_map[i] == -1) Draw_O( object_map[i][0], object_map[i][1], -1, j);
}
//glDisable(GL_COLOR_MATERIAL);
glutSwapBuffers();
}
}
// This is called when the window has been resized.
void reshape (int w, int h)
{
Win_x = w;
Win_y = h;
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
}// Read the keyboard
void keyboard (unsigned char key, int x, int y)
{
switch (key)
{
case 'v':
case 'V':
view_state = abs(view_state -1);
break;
case 'b':
case 'B':
light_state = abs(light_state -1);
break;
case 27:
exit(0); // exit program when [ESC] key presseed
break;
default:
break;
}
}
void mouse(int button, int state, int x, int y)
{
// We convert windows mouse coords to out openGL coords
mouse_x = (18 * (float) ((float)x/(float)Win_x))/6;
mouse_y = (18 * (float) ((float)y/(float)Win_y))/6;
// What square have they clicked in?
object_select = mouse_x + mouse_y * 3;
if ( start_game == 0)
{
if ((button == GLUT_RIGHT_BUTTON) && (state == GLUT_DOWN))
21 | P a g e
{
player = 1;
computer = -1;
init_game();
computer_move();
return;
}
if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN))
{
player = -1;
computer = 1;
init_game();
return; }
}
if ( start_game == 1)
{
if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN))
{
if (win == 0)
{
if (box_map[ object_select ] == 0)
{
box_map[ object_select ] = player;
win = check_move();
if (win == 1)
{
start_game = 0;
return;
}
computer_move();
win = check_move();
if (win == 1)
{
win = -1;
start_game = 0;
}
}
}
}
}
if ( win == 2 )start_game = 0;
}
void menu(int choice)
{
switch(choice)
{
22 | P a g e
case 1: abc=1;
glutMouseFunc(mouse);
break;
case 2:
view_state = abs(view_state -1);
break;
case 3: abc=3;
glutMouseFunc(mouse);
break;
case 4:
exit(0);
break;}
}
// Main program
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (850,600);
glutInitWindowPosition (10, 10);
glutCreateWindow (argv[0]);
glutSetWindowTitle("X's and O's 3D");
init ();
glutCreateMenu(menu);
glutAddMenuEntry("start game",1);
glutAddMenuEntry("prespective view",2);
glutAddMenuEntry("help",3);
glutAddMenuEntry("Quit",4);
glutAttachMenu(GLUT_RIGHT_BUTTON);
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutKeyboardFunc(keyboard);
//glutMouseFunc(mouse);
glutTimerFunc( 50, TimeEvent, 1);
glutMainLoop();
return 0;
}
23 | P a g e
CHAPTER-6
SNAPSHOTS:
RESULT
Fig. 6.1: Displaying the Instruction to Start the Game.
Fig. 6.2: Snapshot Showing to Start the Game.
24 | P a g e
Fig. 6.3: Snapshot Showing O’s and X’s as the Input.
Fig. 6.4: Snapshot Showing if Player Wins.
25 | P a g e
Fig. 6.5: Snapshot Showing a Tie.
Fig. 6.6: Snapshot Showing if Computer Wins.
26 | P a g e
CONCLUSION
In conclusion, our computer graphics mini project on tic-tac-toe successfully applied
computer graphics principles to create a visually appealing and interactive game. We developed
a responsive game board using rendering techniques and implemented smooth animations to
enhance the user experience. The intuitive user interface allowed for easy navigation and
gameplay. Additionally, the incorporation of an AI opponent added a challenging element to the
game. Through this project, we gained valuable knowledge and hands-on experience in
implementing computer graphics concepts in the context of a popular game.
FUTURE ENHANCEMENT
This project has been designed such that it works on the windows platform. The project
can be designed using different languages and better graphical interfaces. The following features
can be incorporated;
o This project may be useful to follow the architecture of fountain and its further
development.
o We can show that the water color of the fountain can be changed by the interaction of the
mouse.
o We can add some more graphics which show the simulation of other objects including the
sound effects which can give the project an attractive look.
27 | P a g e
References
1. Acharya, Kamal, Attendance Management System Project (April 28, 2024).
Available at
SSRN: https://ssrn.com/abstract=4810251 or http://dx.doi.org/10.2139/ssrn.4810251
2. Acharya, Kamal, Online Food Order System (May 2, 2024). Available at
SSRN: https://ssrn.com/abstract=4814732 or http://dx.doi.org/10.2139/ssrn.4814732
3. Acharya, Kamal, University management system project. (May 1, 2024). Available at
SSRN: https://ssrn.com/abstract=4814103 or http://dx.doi.org/10.2139/ssrn.4814103
4. Acharya, Kamal, Online banking management system. (May 1, 2024). Available at
SSRN: https://ssrn.com/abstract=4813597 or http://dx.doi.org/10.2139/ssrn.4813597
5. Acharya, Kamal, Online Job Portal Management System (May 5, 2024). Available at
SSRN: https://ssrn.com/abstract=4817534 or http://dx.doi.org/10.2139/ssrn.4817534
6. Acharya, Kamal, Employee leave management system. (May 7, 2024). Available
at SSRN: https://ssrn.com/abstract=4819626 or http://dx.doi.org/10.2139/ssrn.4819626
7. Acharya, Kamal, Online electricity billing project report. (May 7, 2024). Available at
SSRN: https://ssrn.com/abstract=4819630 or http://dx.doi.org/10.2139/ssrn.4819630
8. Acharya, Kamal, POLICY MANAGEMENT SYSTEM PROJECT REPORT. (December 10,
2023). Available at
SSRN: https://ssrn.com/abstract=4831694 or http://dx.doi.org/10.2139/ssrn.4831694
9. Acharya, Kamal, Online job placement system project report. (January 10, 2023).
Available at
SSRN: https://ssrn.com/abstract=4831638 or http://dx.doi.org/10.2139/ssrn.4831638
10. Acharya, Kamal, Software testing for project report. (May 16, 2023). Available at
SSRN: https://ssrn.com/abstract=4831028 or http://dx.doi.org/10.2139/ssrn.4831028
11. Acharya, Kamal, ONLINE CRIME REPORTING SYSTEM PROJECT. (August 10, 2022).
Available at
SSRN: https://ssrn.com/abstract=4831015 or http://dx.doi.org/10.2139/ssrn.4831015
12. Acharya, Kamal, Burger ordering system project report. (October 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4832704 or http://dx.doi.org/10.2139/ssrn.4832704
13. Acharya, Kamal, Teachers Record Management System Project Report (December 10,
2023). Available at
SSRN: https://ssrn.com/abstract=4833821 or http://dx.doi.org/10.2139/ssrn.4833821
14. Acharya, Kamal, Dairy Management System Project Report (December 20, 2020).
Available at
SSRN: https://ssrn.com/abstract=4835231 or http://dx.doi.org/10.2139/ssrn.4835231
15. Acharya, Kamal, Electrical Shop Management System Project (December 10, 2019).
Available at
SSRN: https://ssrn.com/abstract=4835238 or http://dx.doi.org/10.2139/ssrn.4835238
28 | P a g e
16. Acharya, Kamal, Online book store management system project report. (Febuary 10, 2020).
Available at
SSRN: https://ssrn.com/abstract=4835277 or http://dx.doi.org/10.2139/ssrn.4835277
17. Acharya, Kamal, Paint shop management system project report. (January 10, 2019).
Available at
SSRN: https://ssrn.com/abstract=4835441 or http://dx.doi.org/10.2139/ssrn.4835441
18. Acharya, Kamal, Supermarket billing system project report. (August 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4835474 or http://dx.doi.org/10.2139/ssrn.4835474
19. Acharya, Kamal, Online taxi booking system project report. (March 10, 2022). Available at
SSRN: https://ssrn.com/abstract=4837729 or http://dx.doi.org/10.2139/ssrn.4837729
20. Acharya, Kamal, Online car servicing system project report. (March 10, 2023). Available
at SSRN: https://ssrn.com/abstract=4837832 or http://dx.doi.org/10.2139/ssrn.4837832
21. Acharya, Kamal, School management system project report. (July 10, 2021). Available at
SSRN: https://ssrn.com/abstract=4837837 or http://dx.doi.org/10.2139/ssrn.4837837
22. Acharya, Kamal, Furniture Showroom Management System Project Report (March 21,
2021). Available at
SSRN: https://ssrn.com/abstract=4839422 or http://dx.doi.org/10.2139/ssrn.4839422
23. Acharya, Kamal, Online Vehicle Rental System Project Report (March 21, 2019). Available
at SSRN: https://ssrn.com/abstract=4839429 or http://dx.doi.org/10.2139/ssrn.4839429
24. Acharya, Kamal, Fruit Shop Management System Project Report (August 10, 2023).
Available at
SSRN: https://ssrn.com/abstract=4841048 or http://dx.doi.org/10.2139/ssrn.4841048
25. Acharya, Kamal, Hall Booking Management System Project Report (December 21, 2023).
Available at
SSRN: https://ssrn.com/abstract=4841055 or http://dx.doi.org/10.2139/ssrn.4841055
26. Acharya, Kamal, Lundry Management System Project Report (October 21, 2023). Available
at SSRN: https://ssrn.com/abstract=4841059 or http://dx.doi.org/10.2139/ssrn.4841059
27. Acharya, Kamal, A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
(September 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4841209 or http://dx.doi.org/10.2139/ssrn.4841209
28. Acharya, Kamal, A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT
(May 25, 2024). Available at
SSRN: https://ssrn.com/abstract=4841210 or http://dx.doi.org/10.2139/ssrn.4841210
29. Acharya, Kamal, ONLINE DATING MANAGEMENT SYSTEM PROJECT REPORT. (April
25, 2023). Available at
SSRN: https://ssrn.com/abstract=4842066 or http://dx.doi.org/10.2139/ssrn.4842066
30. Acharya, Kamal, ONLINE RESUME BUILDER MANAGEMENT SYSTEM PROJECT
REPORT. (April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4842071 or http://dx.doi.org/10.2139/ssrn.4842071
31. Acharya, Kamal, TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT (August 21,
2023). Available at
SSRN: https://ssrn.com/abstract=4842082 or http://dx.doi.org/10.2139/ssrn.4842082
29 | P a g e
32. Acharya, Kamal, Chat Application Through Client Server Management System Project
Report (June 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4842761 or http://dx.doi.org/10.2139/ssrn.4842761
33. Acharya, Kamal, Web Chatting Application Management System Project Report (April 25,
2022). Available at
SSRN: https://ssrn.com/abstract=4842771 or http://dx.doi.org/10.2139/ssrn.4842771
34. Acharya, Kamal, Automobile management system project report (May 25, 2022). Available
at SSRN: https://ssrn.com/abstract=4846917 or http://dx.doi.org/10.2139/ssrn.4846917
35. Acharya, Kamal, College bus management system project report (April 25, 2023).
Available at
SSRN: https://ssrn.com/abstract=4846920 or http://dx.doi.org/10.2139/ssrn.4846920
36. Acharya, Kamal, Courier management system project report (May 25, 2023). Available at
SSRN: https://ssrn.com/abstract=4846922 or http://dx.doi.org/10.2139/ssrn.4846922
37. Acharya, Kamal, Event management system project report (April 25, 2021). Available at
SSRN: https://ssrn.com/abstract=4846927 or http://dx.doi.org/10.2139/ssrn.4846927
38. Acharya, Kamal, Library management system project report II (May 25, 2020). Available
at SSRN: https://ssrn.com/abstract=4848857 or http://dx.doi.org/10.2139/ssrn.4848857
39. Kamal Acharya. Teacher record management system project report. Authorea. August 02,
2024. DOI: https://doi.org/10.22541/au.172261514.46787329/v1
40. Kamal Acharya. POST OFFICE MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 02, 2024.
DOI: https://doi.org/10.22541/au.172261514.44494375/v1
41. Kamal Acharya. Fruit shop management system project report. Authorea. August 02, 2024.
DOI: https://doi.org/10.22541/au.172261514.42227675/v1
42. Kamal Acharya. Dairy management system project report. Authorea. August 02, 2024.
DOI: https://doi.org/10.22541/au.172261513.39402347/v1
43. Kamal Acharya. DATA COMMUNICATION AND COMPUTER NETWORK
MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.37480177/v1
44. Kamal Acharya. School management system project report. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.34023165/v1
45. Kamal Acharya. A CASE STUDY OF CINEMA MANAGEMENT SYSTEM
PROJECT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254873.30191075/v1
46. Kamal Acharya. A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM
PROJECT. Authorea. August 01, 2024
DOI: https://doi.org/10.22541/au.172254872.26972790/v1
47. Kamal Acharya. Web chatting application project report management
system. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254871.18588592/v1
48. Kamal Acharya. RETAIL STORE MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172254871.14590154/v1
30 | P a g e
49. Kamal Acharya. SUPERMARKET MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172252491.19145062/v1
50. Kamal Acharya. SOCIAL MEDIA MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. August 01, 2024.
DOI: https://doi.org/10.22541/au.172252491.11210579/v1
51. Kamal Acharya. Online music portal management system project report. Authorea. August
01, 2024. DOI: https://doi.org/10.22541/au.172252488.89734698/v1
52. Kamal Acharya. COLLEGE BUS MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. July 31, 2024.
DOI: https://doi.org/10.22541/au.172245277.70798942/v1
53. Kamal Acharya. AUTOMOBILE MANAGEMENT SYSTEM PROJECT
REPORT. Authorea. July 31, 2024.
DOI: https://doi.org/10.22541/au.172245276.67982593/v1
54. Kamal Acharya. Ludo management system project report. Authorea. July 31, 2024
DOI: https://doi.org/10.22541/au.172243999.98091616/v1
55. Kamal Acharya. Literature online quiz system project report. Authorea. July 31,
2024. DOI: https://doi.org/10.22541/au.172243825.53562953/v1
56. Kamal Acharya. Avoid waste management system project. Authorea. July 29, 2024
DOI: https://doi.org/10.22541/au.172228528.85022205/v1
57. Kamal Acharya. CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT
SYSTEM PROJECT. Authorea. July 29, 2024.
DOI: https://doi.org/10.22541/au.172228527.74316529/v1
58. Kamal Acharya. Parking allotment system project report. Authorea. July 29, 2024.
DOI: https://doi.org/10.22541/au.172227078.89966943/v1
59. Kamal Acharya. HEALTH INSURANCE CLAIM MANAGEMENT SYSTEM. Authorea. July
26, 2024. DOI: https://doi.org/10.22541/au.172202020.06707762/v1
60. Kamal Acharya. ONLINE TRAIN BOOKING SYSTEM PROJECT REPORT. Authorea. July
22, 2024. DOI: https://doi.org/10.22541/au.172167914.45160406/v1
61. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July
16, 2024. DOI: https://doi.org/10.22541/au.172116616.60220024/v1
62. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July
16, 2024. DOI: https://doi.org/10.22541/au.172116616.60220024/v1
View publication stats
Ad

More Related Content

Similar to TICTACTOE GAME MANAGEMENT SYSTEM PROJECT REPORT. (20)

Bouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdfBouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdf
Kamal Acharya
 
Slideshare
SlideshareSlideshare
Slideshare
Abu Sayem Sumon
 
Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...
Iaetsd Iaetsd
 
Graphical User Interface or GUI
Graphical User Interface or GUIGraphical User Interface or GUI
Graphical User Interface or GUI
Jakaria Hossain Ridoy
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL
Sharath Raj
 
Computer graphics notes
Computer graphics notesComputer graphics notes
Computer graphics notes
smruti sarangi
 
bhargav_flowing-fountain
bhargav_flowing-fountainbhargav_flowing-fountain
bhargav_flowing-fountain
Bhargav K. Naidu
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
Dileep Maurya
 
Computer-Vision_Integrating-Technology_MOB_17.06.16
Computer-Vision_Integrating-Technology_MOB_17.06.16Computer-Vision_Integrating-Technology_MOB_17.06.16
Computer-Vision_Integrating-Technology_MOB_17.06.16
Schuyler Kennedy
 
Gpu computing-webgl
Gpu computing-webglGpu computing-webgl
Gpu computing-webgl
VisCircle
 
CG_report_merged (1).pdf
CG_report_merged (1).pdfCG_report_merged (1).pdf
CG_report_merged (1).pdf
rahul812082
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
IJERD Editor
 
Computer graphics workbook
Computer graphics workbookComputer graphics workbook
Computer graphics workbook
Muhammadalizardari
 
Operating CNC and Laser Machine Everywhere using IoT
Operating CNC and Laser Machine Everywhere using IoTOperating CNC and Laser Machine Everywhere using IoT
Operating CNC and Laser Machine Everywhere using IoT
ijtsrd
 
Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animations
halo4robo
 
201001162_report
201001162_report201001162_report
201001162_report
Shirish Jadav
 
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDSFACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
IRJET Journal
 
Marker less augmentedd reality using computer vision
Marker less augmentedd reality using computer visionMarker less augmentedd reality using computer vision
Marker less augmentedd reality using computer vision
gametester6
 
Dynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdfDynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdf
AgneshShetty
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
Prabindh Sundareson
 
Bouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdfBouncing ball content management system project report.pdf
Bouncing ball content management system project report.pdf
Kamal Acharya
 
Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...Iirdem design and implementation of finger writing in air by using open cv (c...
Iirdem design and implementation of finger writing in air by using open cv (c...
Iaetsd Iaetsd
 
Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL Computer Graphics Project Report on Sinking Ship using OpenGL
Computer Graphics Project Report on Sinking Ship using OpenGL
Sharath Raj
 
Computer graphics notes
Computer graphics notesComputer graphics notes
Computer graphics notes
smruti sarangi
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
Dileep Maurya
 
Computer-Vision_Integrating-Technology_MOB_17.06.16
Computer-Vision_Integrating-Technology_MOB_17.06.16Computer-Vision_Integrating-Technology_MOB_17.06.16
Computer-Vision_Integrating-Technology_MOB_17.06.16
Schuyler Kennedy
 
Gpu computing-webgl
Gpu computing-webglGpu computing-webgl
Gpu computing-webgl
VisCircle
 
CG_report_merged (1).pdf
CG_report_merged (1).pdfCG_report_merged (1).pdf
CG_report_merged (1).pdf
rahul812082
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
IJERD Editor
 
Operating CNC and Laser Machine Everywhere using IoT
Operating CNC and Laser Machine Everywhere using IoTOperating CNC and Laser Machine Everywhere using IoT
Operating CNC and Laser Machine Everywhere using IoT
ijtsrd
 
Displaying 3 d polygon animations
Displaying 3 d polygon animationsDisplaying 3 d polygon animations
Displaying 3 d polygon animations
halo4robo
 
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDSFACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
FACE COUNTING USING OPEN CV & PYTHON FOR ANALYZING UNUSUAL EVENTS IN CROWDS
IRJET Journal
 
Marker less augmentedd reality using computer vision
Marker less augmentedd reality using computer visionMarker less augmentedd reality using computer vision
Marker less augmentedd reality using computer vision
gametester6
 
Dynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdfDynamic sorting algorithm vizualizer.pdf
Dynamic sorting algorithm vizualizer.pdf
AgneshShetty
 

More from Kamal Acharya (20)

Software testing for project report system.
Software testing for project report system.Software testing for project report system.
Software testing for project report system.
Kamal Acharya
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
Kamal Acharya
 
COURIER MANAGEMENT SYSTEM PROJECT REPORT.
COURIER MANAGEMENT SYSTEM PROJECT REPORT.COURIER MANAGEMENT SYSTEM PROJECT REPORT.
COURIER MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORTCHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
Kamal Acharya
 
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORTTOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
School management system project report.
School management system project report.School management system project report.
School management system project report.
Kamal Acharya
 
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECTA CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
Kamal Acharya
 
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORTHALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
SCIENTIFIC CALCULATOR PROJECT REPORT REPORT
SCIENTIFIC CALCULATOR PROJECT REPORT REPORTSCIENTIFIC CALCULATOR PROJECT REPORT REPORT
SCIENTIFIC CALCULATOR PROJECT REPORT REPORT
Kamal Acharya
 
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORTWATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECTAN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
Kamal Acharya
 
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORTFLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT IISTUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
Kamal Acharya
 
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORTADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
Software testing for project report system.
Software testing for project report system.Software testing for project report system.
Software testing for project report system.
Kamal Acharya
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.
Kamal Acharya
 
COURIER MANAGEMENT SYSTEM PROJECT REPORT.
COURIER MANAGEMENT SYSTEM PROJECT REPORT.COURIER MANAGEMENT SYSTEM PROJECT REPORT.
COURIER MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
VACCINE MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORTCHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
ONLINE BLOOD DONATION MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
ONLINE COURSE REGISTER SYSTEM PROJECT REPORT.
Kamal Acharya
 
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORTTOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
School management system project report.
School management system project report.School management system project report.
School management system project report.
Kamal Acharya
 
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECTA CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT
Kamal Acharya
 
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
LUNDRY MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
TEACHERS RECORD MANAGEMENT SYSTEM PROJECT REPORT.
Kamal Acharya
 
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORTHALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
HALL BOOKING MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
SCIENTIFIC CALCULATOR PROJECT REPORT REPORT
SCIENTIFIC CALCULATOR PROJECT REPORT REPORTSCIENTIFIC CALCULATOR PROJECT REPORT REPORT
SCIENTIFIC CALCULATOR PROJECT REPORT REPORT
Kamal Acharya
 
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORTWATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
WATER SUPPLY MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECTAN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
AN INTERNSHIP REPORT ON STUDENT FEEDBACK MANAGEMENT SYSTEM PROJECT
Kamal Acharya
 
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORTFLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
FLOWER SHOP BILLING MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT IISTUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
STUDENT INFORMATION MANAGEMENT SYSTEM PROJECT REPORT II
Kamal Acharya
 
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORTADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
ADVANCED HOSPITAL MANAGEMENT SYSTEM PROJECT REPORT
Kamal Acharya
 
Ad

Recently uploaded (20)

Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
theory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptxtheory-slides-for react for beginners.pptx
theory-slides-for react for beginners.pptx
sanchezvanessa7896
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
π0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalizationπ0.5: a Vision-Language-Action Model with Open-World Generalization
π0.5: a Vision-Language-Action Model with Open-World Generalization
NABLAS株式会社
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Machine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptxMachine learning project on employee attrition detection using (2).pptx
Machine learning project on employee attrition detection using (2).pptx
rajeswari89780
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Ad

TICTACTOE GAME MANAGEMENT SYSTEM PROJECT REPORT.

  • 1. See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/383415464 TICTACTOE GAME MANAGEMENT SYSTEM PROJECT REPORT. Research Proposal · August 2023 DOI: 10.13140/RG.2.2.24010.17605 CITATIONS 0 READS 330 1 author: Kamal Acharya Tribhuvan University 248 PUBLICATIONS 4,437 CITATIONS SEE PROFILE All content following this page was uploaded by Kamal Acharya on 26 August 2024. The user has requested enhancement of the downloaded file.
  • 2. 1 | P a g e AN INTERNSHIP REPORT ON TICTACTOE GAME MANAGEMENT SYSTEM PROJECT BY KAMAL ACHARYA (Tribhuvan University) Date: 2023/08/27
  • 3. 2 | P a g e CHAPTER-1 INTRODUCTION 1.1 INTRODUCTION TO COMPUTER GRAPHICS: Computer Graphics is concerned with all aspects of producing pictures or images using a computer. We can create images that are indistinguishable from photographs of real objects. In other terms, Computer Graphics are the graphics created by the computers, and more generally, the representation and manipulation of image data by a computer. The development of computer graphics has been driven both by the needs of the user community and by advances in hardware and software. Typically, the term Computer Graphics refers to several different things; i. The representation and manipulation of image data by a computer. ii. The various technologies used to create and manipulate images. iii. The images so produced, and manipulating visual content. 1.2 HISTORY OF COMPUTER GRAPHICS: The phrase Computer Graphics was coined in 1960 by William Fetter, a graphic designer for Boeing. The field of Computer Graphics developed with the emergence of computer graphics hardware. Early projects like the Whirlwind and SAGE projects introduced the CRT as a viable display and interaction interface and introduced the light pen as an input device. Further advances in computing led to greater advancements in interactive computer graphics. In 1959, the TX-2 computer was developed at MIT Lincoln Laboratory. A light pen could be used to draw sketches on the computer using Ivan Sutherland’s revolutionary Sketchpad software. Also in 1961 another student at MIT, Steve Russell, created the first video game, Space war. E. E. Zajac, a scientist at Bell Telephone Laboratory (BTL), created a film called “Simulation of a two-giro gravity attitude control system” in 1963. In this computer generated film, Zajac showed how the attitude of a satellite could be altered as it orbits the Earth. Many of the most important early breakthroughs in computer graphics research occurred at the University of Utah in the 1970s. The first major advance in 3D computer graphics was created at UU by these early pioneers, the hidden-surface algorithm. In order to draw a representation of a 3D object on the
  • 4. 3 | P a g e screen, the computer must determine which surfaces are “behind” the object from the viewer’s perspective, and thus should be “hidden” when the computer creates (or renders) the image. Graphics and application processing were increasingly migrated to the intelligence in the workstation, rather than continuing to rely on central mainframe and mini-computers. 3D graphics became more popular in the 1990s in gaming, multimedia and animation. Computer graphics used in films and video games gradually began to be realistic to the point of entering the uncanny valley. Examples include the later Final Fantasy games and animated films like The Polar Express. 1.3 INTRODUCTION TO OpenGL: OpenGL is a software interface to graphics hardware. This interface consists of about 150 distinct commands that are used to specify the objects and operations needed to produce interactive three-dimensional applications. OpenGL is designed as a streamlined hardware independent interface to be implemented on many different hardware platforms. These are certain characteristics of OpenGL;  OpenGL is a better documented API.  OpenGL is much easier to learn and program.  OpenGL has the best demonstrated 3D performance for any API. The OpenGL specification describes an abstract API for drawing 2D and 3D graphics. Although it's possible for the API to be implemented entirely in software, it's designed to be implemented mostly or entirely in hardware. In addition to being language-independent, OpenGL is also platform-independent. The specification says nothing on the subject of obtaining, and managing, an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering, providing no APIs related to input, audio, or windowing. OpenGL is an evolving API. New versions of the OpenGL specification are regularly released by the Khronos Group, each of which extends the API to support various new features. In addition to the features required by the core API, GPU vendors may provide additional functionality in the form of extensions. Extensions may introduce new functions and new constants, and may relax or remove restrictions on existing OpenGL functions. Vendors can use extensions to expose custom APIs without needing support from other vendors or the Khronos Group as a whole, which greatly increases the flexibility of OpenGL. All extensions are collected in, and defined by, the OpenGL Registry.
  • 5. 4 | P a g e Fig. 1.3: OpenGL Pipeline. 1.4 INTRODUCTION TO GLUT: GLUT is the OpenGL utility toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing API for OpenGL. GLUT makes it easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works across all PC and workstation OS platforms. GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits. The GLUT library has both C, C++ (same as C), FORTRAN, and ADA programming bindings. The GLUT source code distribution is portable to nearly all OpenGL implementations and platforms. Fig. 1.4: Library Organization of OpenGL.
  • 6. 5 | P a g e 1.5 APPLICATIONS OF COMPUTER GRAPHICS: The development of computer graphics has been driven both by the needs of the user community and by advances in hardware and software. The applications of computer graphics are many and varied. We can however divide them into four major areas;  DISPLAY OF INFORMATION: More than 4000 years ago, the Babylonians developed floor. plans of buildings on stones. Today, the same type of information is generated by architects using computers. Over the past 150 years, workers in the field of statistics have explored techniques for generating plots. Now, we have computer plotting packages. Supercomputers now allow researchers in many areas to solve previously intractable problems. Thus, Computer Graphics has innumerable applications.  DESIGN: Professions such as engineering and architecture are concerned with design. Today, the use of interactive graphical tools in CAD, in VLSI circuits, characters for animation have developed in a great way.  SIMULATION AND ANIMATION: One of the most important uses has been in pilots‟ training. Graphical flight simulators have proved to increase safety and reduce expenses. Simulators can be used for designing robots, plan it’s path, etc. Video games and animated movies can now be made with low expenses.  USER INTERFACES: Our interaction with computers has become dominated by a visual paradigm. The users’ access to internet is through graphical network browsers. Thus Computer Graphics plays a major role in all fields. 1.6 APPLICATIONS OF OpenGL:  OpenGL (Open Graphics Library)is a cross-language, multi-platform API for rendering 2D and 3D computer graphics.  The API is typically used to interact with a GPU, to achieve hardware accelerated rendering.  It is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games.
  • 7. 6 | P a g e 1.7 OpenGL PRIMITIVES: OpenGL supports two classes of primitives; i. Geometric Primitives. ii. Image(Raster) Primitives. Geometric primitives are specified in the problem domain and include points, line segments, polygons, curves and surfaces. Raster primitives, such as arrays of pixels pass through a separate parallel pipeline on their way to the frame buffer. There are ten basic OpenGL primitives; Fig. 1.7: OpenGL Primitives.
  • 8. 7 | P a g e CHAPTER-2 REQUIREMENT SPECIFICATION The graphics editor has been programmed in C. It makes use of Turbo C Graphics library package for creating the user interface. This is a subroutine library for terminal independent screen painting and input event handling. 2.1 HARDWARE REQUIREMENTS: The standard output device is assumed to be a Color Monitor. It is quite essential for any graphics package to have this, as provision of color options to the user is a must. The mouse, the main input device, has to be functional i.e. used to give input in the game. A keyboard is used for controlling and inputting data in the form of characters, numbers i.e. to change the user views. Minimum Requirements expected are cursor movement, creating objects like lines, squares, rectangles, polygons, etc. Transformations on objects/selected area should be possible. Filling of area with the specified color should be possible. i. Processor: Intel dual core i5. ii. RAM: 1GB RAM or above. iii. Input devices: Keyboard. iv. Output devices: Monitor. 2.2 SOFTWARE REQUIREMENTS: The editor has been implemented on the OpenGL platform and mainly requires the appropriate version of Microsoft Visual Studio. i. Operating System: Microsoft Windows 10. ii. Microsoft Visual Studio 2010. iii. glut.h header file. iv. glut.dll library file.
  • 9. 8 | P a g e CHAPTER-3 ABOUT THE PROJECT It is the same noughts and crosses or the Xs and Os, the other names for Tic-Tac-Toe, you’ve played with paper and pencil. This mini game project is written in C language in a very simple manner; it is complete and totally error-free. 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- a simple console application with graphics. This Tic-Tac-Toe game in C is compiled in Code::Blocks with gcc compiler. The source code is not that long; it is about 400 lines. While making a Tic-Tac-Toe game using C language, it is important to make use of arrays. The Xs and Os are kept in different arrays, and they are passed between several functions in the code to keep track of how the game goes. With the code here you can play the game choosing either X or O against the computer. This Tic-Tac-Toe C game is such that you will have to input a numerical character, from 1 to 9, to select a position for X or O into the space you want. For example: if you are playing with O and you input 2, the O will go to first row – second column. If you want to place O in third row – first column, you have to enter 7. And, it is similar for the other positions.
  • 10. 9 | P a g e CHAPTER-4 DESIGN Design of the project includes the initialization and the flow in which the project works. The initialization involves the use of mouse and keyboard functions. Flow of control includes the working pattern of the project. INITIALIZATION: 1. The game is to be played between two people (in this program between HUMAN and COMPUTER). 2. One of the player chooses “O” and the other “X” to mark their respective cells. 3. The game starts with one of the players and the game ends when one of the players has one whole row/ column/ diagonal filled with his/her respective character (“O” or “X”). 4. If no one wins, then the game is said to be draw. FLOW OF CONTROL: A board game (such as Tic-tac-toe) is typically programmed as a state machine. Depending on the current-state and the player's move, the game goes into the next-state. In this example, I use a variable currentState to keep track of the current-state of the game, and define named-constants to denote the various states of the game (PLAYING, DRAW, CROSS_WON, and NOUGHT_WON). A method called updateGame() is defined, which will be called after every move to update this currentState, by checking the status of the game-board. Two methods are defined for printing the game board, printBoard() and printCell(). The printBoard() shall call printCell() to print each of the 9 cells. This seems trivial here, but will be useful in the object-oriented design to separate the board and cells into separate classes.
  • 11. 10 | P a g e FLOWCHART: Fig. 4.1: Flowchart of Tic-Tac-Toe Working.
  • 12. 11 | P a g e CHAPTER-5 IMPLEMENTATION 5.1 BUILT-IN FUNCTIONS: 1) glColor3f() - Used to display color. 2) glBegin() - Used to accept a single argument. 3) glVertex2f() - Used to specify a line a line, point. 4) glutPostRedisplay() - Marks the current window as needing to be redisplayed. 5) glClearColor(0.0,0.0,0.0,0.0) - Specifies clear values for the color buffers. 6) glEnable(GL_DEPTH_TEST) - Enables the OpenGL capabilities, Specifies the conditions under which the pixels will be drawn. 7) glLoadIdentity() - Replaces current matrix with identity matrix. 8) glViewport() - Sets the view port. 9) glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB) - Sets the initial display mode. 10) glutInitWindowSize(500,500) and glutInitWindowPosition(50,50) - Set the initial window size and position respectively. 11) glutCreateWindow() - Creates a top level window with the window name as specified. 12) glutDisplayFunc(display) - Sets the display call back for the current window. 13) glutReshapeFunc(reshape) - Sets the reshape call back for the current window. 14) glutMainLoop() - Enters the GLUT event processing loop. This routine should be called atmost once in a GLUT program. Once called, this routine will never return. It will calls necessary any callbacks that have been registered.
  • 13. 12 | P a g e 5.2 SOURCE CODE: // Tic Tac Toe or X's and O's. // Keyboard input // 'v' = view ortho/perspective // 'l' = lighting on/of #include <GL/glut.h> // glut (gl utility toolkit) basic windows functions, keyboard, mouse. #include <stdio.h> // standard (I/O library) #include <stdlib.h> // standard library (set of standard C functions #include <math.h> // Math library (Higher math functions ) #include<string.h> // lighting GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat LightPosition[]= { 5.0f, 25.0f, 5.0f, 1.0f }; GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; int abc=0; // mouse variables: Win = windows size, mouse = mouse position int mouse_x, mouse_y, Win_x, Win_y, object_select; // state variables for Orho/Perspective view, lighting on/off static int view_state = 0, light_state = 0; // Use to spin X's and O's int spin, spinboxes; // Win = 1 player wins, -1 computer wins, 2 tie. // player or computer; 1 = X, -1 = O // start_game indicates that game is in play. int player, computer, win, start_game; // alingment of boxes in which one can win // We have 8 posiblities, 3 accross, 3 down and 2 diagnally // // 0 | 1 | 2 // 3 | 4 | 5 // 6 | 7 | 8 // // row, colunm, diagnal information static int box[8][3] = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}, {0, 3, 6}, {1, 4, 7}, {2, 5, 8}, {0, 4, 8}, {2, 4, 6}}; // Storage for our game board // 1 = X's, -1 = O's, 0 = open space int box_map[9]; // center x,y location for each box int object_map[9][2] = {{-6,6},{0,6},{6,6},{-6,0},{0,0},{6,0},{-6,-6},{0,-6},{6,-6}};// quadric pointer for build our X GLUquadricObj *Cylinder; // Begin game routine void init_game(void)
  • 14. 13 | P a g e { int i; // Clear map for new game for( i = 0; i < 9; i++) { box_map[i] = 0; } // Set 0 for no winner win = 0; start_game = 1; } // Check for three in a row/colunm/diagnal // returns 1 if there is a winner int check_move( void ) { int i, t = 0; //Check for three in a row for( i = 0; i < 8; i++) { t = box_map[box[i][0]] + box_map[box[i][1]] + box_map[box[i][2]]; if ( (t == 3) || ( t == -3) ) { spinboxes = i; return( 1 ); } } t = 0; // check for tie for( i = 0; i < 8; i++) { t = t + abs(box_map[box[i][0]]) + abs( box_map[box[i][1]]) + abs( box_map[box[i][2]]); } if ( t == 24 ) return( 2 ); return( 0 ); } // Do we need to block other player? int blocking_win(void){ int i, t; for( i = 0; i < 8; i++) { t = box_map[box[i][0]] + box_map[box[i][1]] + box_map[box[i][2]]; if ( (t == 2) || ( t == -2) ) { // Find empty if (box_map[box[i][0]] == 0) box_map[box[i][0]] = computer; if (box_map[box[i][1]] == 0) box_map[box[i][1]] = computer;
  • 15. 14 | P a g e if (box_map[box[i][2]] == 0) box_map[box[i][2]] = computer; return( 1 ); } } return( 0 ); } // check for a free space in corner int check_corner(void) { int i; if ( box_map[0] == 0) { box_map[0] = computer; i = 1; return( 1 ); } if ( box_map[2] == 0) { box_map[2] = computer; i = 1; return( 1 ); } if ( box_map[6] == 0) { box_map[6] = computer; i = 1; return( 1 ); } if ( box_map[8] == 0) { box_map[8] = computer; i = 1; return( 1 ); } return( 0 ); }// Check for free space in row int check_row(void) { if ( box_map[4] == 0) { box_map[4] = computer; return( 1 ); } if ( box_map[1] == 0) { box_map[1] = computer;
  • 16. 15 | P a g e return( 1 ); } if ( box_map[3] == 0) { box_map[3] = computer; return( 1 ); } if ( box_map[5] == 0) { box_map[5] = computer; return( 1 ); } if ( box_map[7] == 0) { box_map[7] = computer; return( 1 ); } return( 0 ); } // logic for computer's turn int computer_move() { if ( blocking_win() == 1) return( 1 ); if ( check_corner() == 1) return( 1 ); if ( check_row() == 1) return( 1); return( 0 ); } // I use this to put text on the screen void Sprint( int x, int y, char *st) { int l,i; l=strlen( st ); // see how many characters are in text string.glRasterPos2i( x, y); // location to start printing text for( i=0; i < l; i++) // loop until i is greater then l { glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, st[i]); // Print a character on the screen } } // This creates the spinning of the cube. static void TimeEvent(int te) { spin++; // increase cube rotation by 1 if (spin > 360) spin = 180; // if over 360 degress, start back at zero. glutPostRedisplay(); // Update screen with new rotation data glutTimerFunc( 8, TimeEvent, 1); // Reset our timmer.
  • 17. 16 | P a g e } // Setup our Opengl world, called once at startup. void init(void) { glClearColor (0.6,0.6,0.4,0.0); // When screen cleared, use black. glShadeModel (GL_SMOOTH); // How the object color will be rendered smooth or flat glEnable(GL_DEPTH_TEST); // Check depth when rendering // Lighting is added to scene glLightfv(GL_LIGHT1 ,GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT1 ,GL_DIFFUSE, LightDiffuse); glLightfv(GL_LIGHT1 ,GL_POSITION, LightPosition); glEnable(GL_LIGHTING); // Turn on lighting glEnable(GL_LIGHT1); // Turn on light 1 start_game = 0; win = 0; // Create a new quadric Cylinder = gluNewQuadric(); gluQuadricDrawStyle( Cylinder, GLU_FILL ); gluQuadricNormals( Cylinder, GLU_SMOOTH ); gluQuadricOrientation( Cylinder, GLU_OUTSIDE ); } void Draw_O(int x, int y, int z, int a) { glPushMatrix(); glTranslatef(x, y, z); glRotatef(a, 1, 0, 0); glutSolidTorus(0.5, 2.0, 8, 16);glPopMatrix(); } void Draw_X(int x, int y, int z, int a) { glPushMatrix(); glTranslatef(x, y, z); glPushMatrix(); glRotatef(a, 1, 0, 0); glRotatef(90, 0, 1, 0); glRotatef(45, 1, 0, 0); glTranslatef( 0, 0, -3); gluCylinder( Cylinder, 0.5, 0.5, 6, 16, 16); //glutSolidCone( 2.5, 3.0, 16, 8 ); glPopMatrix(); glPushMatrix(); glRotatef(a, 1, 0, 0); glRotatef(90, 0, 1, 0); glRotatef(315, 1, 0, 0); glTranslatef( 0, 0, -3); gluCylinder( Cylinder, 0.5, 0.5, 6, 16, 16);
  • 18. 17 | P a g e //glutSolidCone( 2.5, 3.0, 16, 8 ); glPopMatrix(); glPopMatrix(); } // Draw our world void display(void) { if(abc==3) { //int mk=0; // glColor3f(0.0,1.0,0.0); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen glColor3f(0.0,1.0,0.0); glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix work glLoadIdentity(); // Clear the matrix glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix work. (drawing) glLoadIdentity(); // Clear the model matrix glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); glColor3f(0.0, 0.0, 1.0);Sprint(-2, 0, "Project by"); Sprint(-2, -1, "Gajanan and Nitin"); Sprint(-3, -2, "To Start press right button"); Sprint(-3, -3, "right button for X's"); Sprint(-3, -4, "and left for O's"); glutSwapBuffers(); } else if(abc==0) { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix work glLoadIdentity(); // Clear the matrix glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix work. (drawing) glLoadIdentity(); // Clear the model matrix glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); glColor3f(0.0, 0.0, 1.0); Sprint(-4, 0, "Project by Gajanana G Bhat and Nitin Kulkarni"); Sprint(-3, -1, "Right Click to Start the Game"); glutSwapBuffers(); } else
  • 19. 18 | P a g e { //char txt[30]; int ix, iy; int i; int j; glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear the screen glMatrixMode (GL_PROJECTION); // Tell opengl that we are doing project matrix work glLoadIdentity(); // Clear the matrix glOrtho(-9.0, 9.0, -9.0, 9.0, 0.0, 30.0); // Setup an Ortho view glMatrixMode(GL_MODELVIEW); // Tell opengl that we are doing model matrix work. (drawing) glLoadIdentity(); // Clear the model matrix glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); glColor3f(1.0, 0.0, 0.0); /*if ( start_game == 0 ) { Sprint(-2, 0, "ggb and kittu"); Sprint(-3, -1, "To Start press"); Sprint(-3, -2, "right button for X's"); Sprint(-3, -3, "and left for O's"); } */ if (win == 1) Sprint( -2, 1, "congratulations you win"); if (win == -1) Sprint( -2, 1, "Computer win"); if (win == 2) Sprint( -2, 1, "Tie"); // Setup view, and print view state on screen if (view_state == 1) { glColor3f( 0.0, 0.0, 1.0); Sprint(-3, 8, "Perspective view"); glMatrixMode (GL_PROJECTION); glLoadIdentity(); gluPerspective(60, 1, 1, 30); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); }else { glColor3f( 1.0, 0.0, 0.0); Sprint(-2, 8, "Ortho view"); } // Lighting on/off if (light_state == 1) { glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); }else
  • 20. 19 | P a g e { glEnable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL); } gluLookAt( 0, 0, 20, 0, 0, 0, 0, 1, 0); // Draw Grid for( ix = 0; ix < 4; ix++) { glPushMatrix(); glColor3f(1,1,1); glBegin(GL_LINES); glVertex2i(-9 , -9 + ix * 6); glVertex2i(9 , -9 + ix * 6 ); glEnd(); glPopMatrix(); } for( iy = 0; iy < 4; iy++ ) { glPushMatrix(); glColor3f(1,1,1); glBegin(GL_LINES); glVertex2i(-9 + iy * 6, 9 ); glVertex2i(-9 + iy * 6, -9 ); glEnd(); glPopMatrix(); } glColorMaterial(GL_FRONT, GL_AMBIENT); glColor4f(0.5, 0.5, 0.5, 1.0); glColorMaterial(GL_FRONT, GL_EMISSION); glColor4f(0.0, 0.0, 0.0, 1.0 ); glColorMaterial(GL_FRONT, GL_SPECULAR); glColor4f(0.35, 0.35, 0.35, 1.0); glColorMaterial(GL_FRONT, GL_DIFFUSE); glColor4f(0.69, 0.69, 0.69, 1.0); //glDisable(GL_COLOR_MATERIAL); glColor3f( 0.0, 0.0, 0.0); // Cube color //glEnable(GL_COLOR_MATERIAL); // Draw object in box's for( i = 0; i < 9; i++) { j = 0; if (abs( win ) == 1 ) { if ( (i == box[spinboxes][0]) || (i == box[spinboxes][1]) || (i == box[spinboxes][2])) { j = spin; }else j = 0;
  • 21. 20 | P a g e } if(box_map[i] == 1) Draw_X( object_map[i][0], object_map[i][1], -1, j); if(box_map[i] == -1) Draw_O( object_map[i][0], object_map[i][1], -1, j); } //glDisable(GL_COLOR_MATERIAL); glutSwapBuffers(); } } // This is called when the window has been resized. void reshape (int w, int h) { Win_x = w; Win_y = h; glViewport (0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode (GL_PROJECTION); glLoadIdentity (); }// Read the keyboard void keyboard (unsigned char key, int x, int y) { switch (key) { case 'v': case 'V': view_state = abs(view_state -1); break; case 'b': case 'B': light_state = abs(light_state -1); break; case 27: exit(0); // exit program when [ESC] key presseed break; default: break; } } void mouse(int button, int state, int x, int y) { // We convert windows mouse coords to out openGL coords mouse_x = (18 * (float) ((float)x/(float)Win_x))/6; mouse_y = (18 * (float) ((float)y/(float)Win_y))/6; // What square have they clicked in? object_select = mouse_x + mouse_y * 3; if ( start_game == 0) { if ((button == GLUT_RIGHT_BUTTON) && (state == GLUT_DOWN))
  • 22. 21 | P a g e { player = 1; computer = -1; init_game(); computer_move(); return; } if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN)) { player = -1; computer = 1; init_game(); return; } } if ( start_game == 1) { if ((button == GLUT_LEFT_BUTTON) && (state == GLUT_DOWN)) { if (win == 0) { if (box_map[ object_select ] == 0) { box_map[ object_select ] = player; win = check_move(); if (win == 1) { start_game = 0; return; } computer_move(); win = check_move(); if (win == 1) { win = -1; start_game = 0; } } } } } if ( win == 2 )start_game = 0; } void menu(int choice) { switch(choice) {
  • 23. 22 | P a g e case 1: abc=1; glutMouseFunc(mouse); break; case 2: view_state = abs(view_state -1); break; case 3: abc=3; glutMouseFunc(mouse); break; case 4: exit(0); break;} } // Main program int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutInitWindowSize (850,600); glutInitWindowPosition (10, 10); glutCreateWindow (argv[0]); glutSetWindowTitle("X's and O's 3D"); init (); glutCreateMenu(menu); glutAddMenuEntry("start game",1); glutAddMenuEntry("prespective view",2); glutAddMenuEntry("help",3); glutAddMenuEntry("Quit",4); glutAttachMenu(GLUT_RIGHT_BUTTON); glutDisplayFunc(display); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); //glutMouseFunc(mouse); glutTimerFunc( 50, TimeEvent, 1); glutMainLoop(); return 0; }
  • 24. 23 | P a g e CHAPTER-6 SNAPSHOTS: RESULT Fig. 6.1: Displaying the Instruction to Start the Game. Fig. 6.2: Snapshot Showing to Start the Game.
  • 25. 24 | P a g e Fig. 6.3: Snapshot Showing O’s and X’s as the Input. Fig. 6.4: Snapshot Showing if Player Wins.
  • 26. 25 | P a g e Fig. 6.5: Snapshot Showing a Tie. Fig. 6.6: Snapshot Showing if Computer Wins.
  • 27. 26 | P a g e CONCLUSION In conclusion, our computer graphics mini project on tic-tac-toe successfully applied computer graphics principles to create a visually appealing and interactive game. We developed a responsive game board using rendering techniques and implemented smooth animations to enhance the user experience. The intuitive user interface allowed for easy navigation and gameplay. Additionally, the incorporation of an AI opponent added a challenging element to the game. Through this project, we gained valuable knowledge and hands-on experience in implementing computer graphics concepts in the context of a popular game. FUTURE ENHANCEMENT This project has been designed such that it works on the windows platform. The project can be designed using different languages and better graphical interfaces. The following features can be incorporated; o This project may be useful to follow the architecture of fountain and its further development. o We can show that the water color of the fountain can be changed by the interaction of the mouse. o We can add some more graphics which show the simulation of other objects including the sound effects which can give the project an attractive look.
  • 28. 27 | P a g e References 1. Acharya, Kamal, Attendance Management System Project (April 28, 2024). Available at SSRN: https://ssrn.com/abstract=4810251 or http://dx.doi.org/10.2139/ssrn.4810251 2. Acharya, Kamal, Online Food Order System (May 2, 2024). Available at SSRN: https://ssrn.com/abstract=4814732 or http://dx.doi.org/10.2139/ssrn.4814732 3. Acharya, Kamal, University management system project. (May 1, 2024). Available at SSRN: https://ssrn.com/abstract=4814103 or http://dx.doi.org/10.2139/ssrn.4814103 4. Acharya, Kamal, Online banking management system. (May 1, 2024). Available at SSRN: https://ssrn.com/abstract=4813597 or http://dx.doi.org/10.2139/ssrn.4813597 5. Acharya, Kamal, Online Job Portal Management System (May 5, 2024). Available at SSRN: https://ssrn.com/abstract=4817534 or http://dx.doi.org/10.2139/ssrn.4817534 6. Acharya, Kamal, Employee leave management system. (May 7, 2024). Available at SSRN: https://ssrn.com/abstract=4819626 or http://dx.doi.org/10.2139/ssrn.4819626 7. Acharya, Kamal, Online electricity billing project report. (May 7, 2024). Available at SSRN: https://ssrn.com/abstract=4819630 or http://dx.doi.org/10.2139/ssrn.4819630 8. Acharya, Kamal, POLICY MANAGEMENT SYSTEM PROJECT REPORT. (December 10, 2023). Available at SSRN: https://ssrn.com/abstract=4831694 or http://dx.doi.org/10.2139/ssrn.4831694 9. Acharya, Kamal, Online job placement system project report. (January 10, 2023). Available at SSRN: https://ssrn.com/abstract=4831638 or http://dx.doi.org/10.2139/ssrn.4831638 10. Acharya, Kamal, Software testing for project report. (May 16, 2023). Available at SSRN: https://ssrn.com/abstract=4831028 or http://dx.doi.org/10.2139/ssrn.4831028 11. Acharya, Kamal, ONLINE CRIME REPORTING SYSTEM PROJECT. (August 10, 2022). Available at SSRN: https://ssrn.com/abstract=4831015 or http://dx.doi.org/10.2139/ssrn.4831015 12. Acharya, Kamal, Burger ordering system project report. (October 10, 2022). Available at SSRN: https://ssrn.com/abstract=4832704 or http://dx.doi.org/10.2139/ssrn.4832704 13. Acharya, Kamal, Teachers Record Management System Project Report (December 10, 2023). Available at SSRN: https://ssrn.com/abstract=4833821 or http://dx.doi.org/10.2139/ssrn.4833821 14. Acharya, Kamal, Dairy Management System Project Report (December 20, 2020). Available at SSRN: https://ssrn.com/abstract=4835231 or http://dx.doi.org/10.2139/ssrn.4835231 15. Acharya, Kamal, Electrical Shop Management System Project (December 10, 2019). Available at SSRN: https://ssrn.com/abstract=4835238 or http://dx.doi.org/10.2139/ssrn.4835238
  • 29. 28 | P a g e 16. Acharya, Kamal, Online book store management system project report. (Febuary 10, 2020). Available at SSRN: https://ssrn.com/abstract=4835277 or http://dx.doi.org/10.2139/ssrn.4835277 17. Acharya, Kamal, Paint shop management system project report. (January 10, 2019). Available at SSRN: https://ssrn.com/abstract=4835441 or http://dx.doi.org/10.2139/ssrn.4835441 18. Acharya, Kamal, Supermarket billing system project report. (August 10, 2021). Available at SSRN: https://ssrn.com/abstract=4835474 or http://dx.doi.org/10.2139/ssrn.4835474 19. Acharya, Kamal, Online taxi booking system project report. (March 10, 2022). Available at SSRN: https://ssrn.com/abstract=4837729 or http://dx.doi.org/10.2139/ssrn.4837729 20. Acharya, Kamal, Online car servicing system project report. (March 10, 2023). Available at SSRN: https://ssrn.com/abstract=4837832 or http://dx.doi.org/10.2139/ssrn.4837832 21. Acharya, Kamal, School management system project report. (July 10, 2021). Available at SSRN: https://ssrn.com/abstract=4837837 or http://dx.doi.org/10.2139/ssrn.4837837 22. Acharya, Kamal, Furniture Showroom Management System Project Report (March 21, 2021). Available at SSRN: https://ssrn.com/abstract=4839422 or http://dx.doi.org/10.2139/ssrn.4839422 23. Acharya, Kamal, Online Vehicle Rental System Project Report (March 21, 2019). Available at SSRN: https://ssrn.com/abstract=4839429 or http://dx.doi.org/10.2139/ssrn.4839429 24. Acharya, Kamal, Fruit Shop Management System Project Report (August 10, 2023). Available at SSRN: https://ssrn.com/abstract=4841048 or http://dx.doi.org/10.2139/ssrn.4841048 25. Acharya, Kamal, Hall Booking Management System Project Report (December 21, 2023). Available at SSRN: https://ssrn.com/abstract=4841055 or http://dx.doi.org/10.2139/ssrn.4841055 26. Acharya, Kamal, Lundry Management System Project Report (October 21, 2023). Available at SSRN: https://ssrn.com/abstract=4841059 or http://dx.doi.org/10.2139/ssrn.4841059 27. Acharya, Kamal, A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT (September 25, 2023). Available at SSRN: https://ssrn.com/abstract=4841209 or http://dx.doi.org/10.2139/ssrn.4841209 28. Acharya, Kamal, A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT (May 25, 2024). Available at SSRN: https://ssrn.com/abstract=4841210 or http://dx.doi.org/10.2139/ssrn.4841210 29. Acharya, Kamal, ONLINE DATING MANAGEMENT SYSTEM PROJECT REPORT. (April 25, 2023). Available at SSRN: https://ssrn.com/abstract=4842066 or http://dx.doi.org/10.2139/ssrn.4842066 30. Acharya, Kamal, ONLINE RESUME BUILDER MANAGEMENT SYSTEM PROJECT REPORT. (April 25, 2021). Available at SSRN: https://ssrn.com/abstract=4842071 or http://dx.doi.org/10.2139/ssrn.4842071 31. Acharya, Kamal, TOLL TEX MANAGEMENT SYSTEM PROJECT REPORT (August 21, 2023). Available at SSRN: https://ssrn.com/abstract=4842082 or http://dx.doi.org/10.2139/ssrn.4842082
  • 30. 29 | P a g e 32. Acharya, Kamal, Chat Application Through Client Server Management System Project Report (June 25, 2023). Available at SSRN: https://ssrn.com/abstract=4842761 or http://dx.doi.org/10.2139/ssrn.4842761 33. Acharya, Kamal, Web Chatting Application Management System Project Report (April 25, 2022). Available at SSRN: https://ssrn.com/abstract=4842771 or http://dx.doi.org/10.2139/ssrn.4842771 34. Acharya, Kamal, Automobile management system project report (May 25, 2022). Available at SSRN: https://ssrn.com/abstract=4846917 or http://dx.doi.org/10.2139/ssrn.4846917 35. Acharya, Kamal, College bus management system project report (April 25, 2023). Available at SSRN: https://ssrn.com/abstract=4846920 or http://dx.doi.org/10.2139/ssrn.4846920 36. Acharya, Kamal, Courier management system project report (May 25, 2023). Available at SSRN: https://ssrn.com/abstract=4846922 or http://dx.doi.org/10.2139/ssrn.4846922 37. Acharya, Kamal, Event management system project report (April 25, 2021). Available at SSRN: https://ssrn.com/abstract=4846927 or http://dx.doi.org/10.2139/ssrn.4846927 38. Acharya, Kamal, Library management system project report II (May 25, 2020). Available at SSRN: https://ssrn.com/abstract=4848857 or http://dx.doi.org/10.2139/ssrn.4848857 39. Kamal Acharya. Teacher record management system project report. Authorea. August 02, 2024. DOI: https://doi.org/10.22541/au.172261514.46787329/v1 40. Kamal Acharya. POST OFFICE MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 02, 2024. DOI: https://doi.org/10.22541/au.172261514.44494375/v1 41. Kamal Acharya. Fruit shop management system project report. Authorea. August 02, 2024. DOI: https://doi.org/10.22541/au.172261514.42227675/v1 42. Kamal Acharya. Dairy management system project report. Authorea. August 02, 2024. DOI: https://doi.org/10.22541/au.172261513.39402347/v1 43. Kamal Acharya. DATA COMMUNICATION AND COMPUTER NETWORK MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172254873.37480177/v1 44. Kamal Acharya. School management system project report. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172254873.34023165/v1 45. Kamal Acharya. A CASE STUDY OF CINEMA MANAGEMENT SYSTEM PROJECT. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172254873.30191075/v1 46. Kamal Acharya. A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT. Authorea. August 01, 2024 DOI: https://doi.org/10.22541/au.172254872.26972790/v1 47. Kamal Acharya. Web chatting application project report management system. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172254871.18588592/v1 48. Kamal Acharya. RETAIL STORE MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172254871.14590154/v1
  • 31. 30 | P a g e 49. Kamal Acharya. SUPERMARKET MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172252491.19145062/v1 50. Kamal Acharya. SOCIAL MEDIA MANAGEMENT SYSTEM PROJECT REPORT. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172252491.11210579/v1 51. Kamal Acharya. Online music portal management system project report. Authorea. August 01, 2024. DOI: https://doi.org/10.22541/au.172252488.89734698/v1 52. Kamal Acharya. COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July 31, 2024. DOI: https://doi.org/10.22541/au.172245277.70798942/v1 53. Kamal Acharya. AUTOMOBILE MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July 31, 2024. DOI: https://doi.org/10.22541/au.172245276.67982593/v1 54. Kamal Acharya. Ludo management system project report. Authorea. July 31, 2024 DOI: https://doi.org/10.22541/au.172243999.98091616/v1 55. Kamal Acharya. Literature online quiz system project report. Authorea. July 31, 2024. DOI: https://doi.org/10.22541/au.172243825.53562953/v1 56. Kamal Acharya. Avoid waste management system project. Authorea. July 29, 2024 DOI: https://doi.org/10.22541/au.172228528.85022205/v1 57. Kamal Acharya. CHAT APPLICATION THROUGH CLIENT SERVER MANAGEMENT SYSTEM PROJECT. Authorea. July 29, 2024. DOI: https://doi.org/10.22541/au.172228527.74316529/v1 58. Kamal Acharya. Parking allotment system project report. Authorea. July 29, 2024. DOI: https://doi.org/10.22541/au.172227078.89966943/v1 59. Kamal Acharya. HEALTH INSURANCE CLAIM MANAGEMENT SYSTEM. Authorea. July 26, 2024. DOI: https://doi.org/10.22541/au.172202020.06707762/v1 60. Kamal Acharya. ONLINE TRAIN BOOKING SYSTEM PROJECT REPORT. Authorea. July 22, 2024. DOI: https://doi.org/10.22541/au.172167914.45160406/v1 61. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July 16, 2024. DOI: https://doi.org/10.22541/au.172116616.60220024/v1 62. Kamal Acharya. COVID MANAGEMENT SYSTEM PROJECT REPORT. Authorea. July 16, 2024. DOI: https://doi.org/10.22541/au.172116616.60220024/v1 View publication stats