Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

ACKNOWLEDGEMENt

I wish to express my deep gratitude and sincere thanks


to my computer teacher Mr. Ashok Prasad Singh
who guided me to complete this project. I take this
opportunity to express my deep sense of gratitude for his
valuable comments, sympathetic attitude and immense
motivation which has sustained my efforts at all stages.

I cannot forget to offer my sincere thanks to my


Classmates and friends for their valuable advice and
Support which I recorded from them time to time which
Helped me to carry out this project successfully.

tHANK YOU
CErtifiCAtE
This is to certify that this dissertation titled
“ TIC – TAC—TOE GAME ” is submitted by
Ayush Raj Of class XII ‘A’ of OXFORD PUBLIC SCHOOL,
RANCHI.
This project is a bona fied piece of work carried under my
guidance and supervision during the academic
year 2023-24.

……………………… ………………………..
Sign. Of Internal Sign. Of External
iNtrODUCtiON

Our project name is Tic-Tac-Toe game. This game is


very popular and is fairly simple by itself.
It is actually a two player game. In this game, there is
a board with n x n squares. In our game, it is 3 x 3 squares.
The goal of Tic-Tac-Toe is to be one of the players
to get three same symbols in a row - horizontally,
vertically or diagonally - on a 3 x 3 grid
OVErViEW
This game can be played in a 3x3 grid. The game can be
played by two players.

 Theory of Game
A player can choose between two symbols with his
opponent , usual games use “X” and “O”.
If first player choose “X” then the second player have to
play with “O” and vice versa. A player marks any of the
3x3 squares with his symbol (may be “X” or “O”) and his
aim is to create a straight line horizontally or vertically or
diagonally with two intensions:
a) Create a straight line before his opponent to win the
game.
b) Restrict his opponent from creating a straight line first.
In case logically no one can create a straight line with his
own symbol, the game results a tie.
Hence there are only three possible results – a player
wins , his opponent wins or it’s a tie.
1 2 3

4 5 6

7 8 9

If any player is able to draw three Xs or three Os in the


Following combinations then that player wins.
The combinations are:
a) 1, 2, 3 b) 4, 5, 6
c) 7, 8, 9 d) 1, 4, 7
e) 2, 5, 8 f) 3, 6, 9
h) 1, 5, 9 i) 3, 5, 7
COrE LOGiC
The core logics in this game – when both
players are human.
The player 1 use “X” and the player 2 use “O”.
The player 1 gets the first chance, when he/she enter the
number then the player 2 gets the chance, if he/she
enters the number which is already occupied then it
displays the message “ Its already occupied, pick another
location”. This continues until any of them wins and it
display the message (“player 1 has won” or “player 2 has
won”). In some case if the match is tie between the
players means no one has won then the message
“Its a Draw” is displayed.
HArDWArE AND sOftWArE rEqUirED

 OPERATING SYSTEM » WINDOW 7 AND ABOVE


 PROCESSOR » ANY

 MONITOR 14.1 OR 15-17 INCH


 KEYBOARD AND MOUSE
 PRINTER(IF PRINT IS REQUIRED-[HARD COPY])
 WINDOW OS
 PYTHON (LATEST VERSION)
CODE
OUtPUt
rUNNiNG ONE MOrE tiME
BiBLiOGrAPHY
 www.wikipedia.com
 www.goggle.com
 Class 11 and 12 Book( Sumita Arora)

You might also like