0% found this document useful (0 votes)
7 views9 pages

Tic Tac Toe

Uploaded by

azeesbabi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views9 pages

Tic Tac Toe

Uploaded by

azeesbabi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

TIC-TAC-

TOE :
IT IS A BASIC TWO PLAYER PLAYING TIC-TAC-
TOE GAME:

It is prepared based upon the


keyboard numbers places
| 7 | 8 | 9 |
| 4 | 5 | 6|
| 1 | 2 | 3 |

IF THE INPUT YOU HAVE GIVEN IS


“9” AND OTHER PLAYER HAS
CHOSSEN “5”
| | | X |
| | O | |
| | | |
IN THIS WAY THE GAME WILL BE
EXECUTED
OUTPUT:

Welcome to Tic Tac Toe!


player 1 : do you want x or O : O
plater 2 will go first.
Are you ready to play? Enter Yes or No.y
______________
| | | |
| | | |
| | | |
--------------
| | | |
| | | |
| | | |
--------------
| | | |
| | | |
| | | |
--------------
choose your next position :(1-9): 2
______________
| | | |
| | | |
| | | |
--------------
| | | |
| | | |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 8
______________
| | | |
| | O | |
| | | |
--------------
| | | |
| | | |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 4
______________
| | | |
| | O | |
| | | |
--------------
| | | |
|X | | |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 6
______________
| | | |
| | O | |
| | | |
--------------
| | | |
|X | | O |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 5
______________
| | | |
| | O | |
| | | |
--------------
| | | |
|X | X | O |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 7
______________
| | | |
|O | O | |
| | | |
--------------
| | | |
|X | X | O |
| | | |
--------------
| | | |
| | X | |
| | | |
--------------
choose your next position :(1-9): 1
______________
| | | |
|O | O | |
| | | |
--------------
| | | |
|X | X | O |
| | | |
--------------
| | | |
|X | X | |
| | | |
--------------
choose your next position :(1-9): 9
______________
| | | |
|O | O | O |
| | | |
--------------
| | | |
|X | X | O |
| | | |
--------------
| | | |
|X | X | |
| | | |
--------------
Congratulations! You have won the game!
do you want to play again? enter ys or no:n
EXECUTED BY:
1. SHAIK BABI AZEES
2. DAMODAR SREEKANTH
3. GUNDRASAM SAKETH RAM
4. MARAKALAKUPPAM SANDEEP

You might also like