software project
DESCRIPTION
Presented by : Ashin Ara Bithi Roll : 09 Iffat Ara Roll : 22 12th Batch Department of Computer Science & Engineering University of Dhaka. Software Project. Tic-Tac-Toe. Presentation at a Glance. Overview Core Logic Limitations Future plan. Overview. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/1.jpg)
Presented by :
Ashin Ara Bithi Roll : 09Iffat Ara Roll : 22
12th Batch Department of Computer Science &
EngineeringUniversity of Dhaka
![Page 2: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/2.jpg)
Presentation at a Glance
• Overview• Core Logic• Limitations• Future plan
![Page 3: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/3.jpg)
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. A player can choose between two symbols (X or O) with his opponent.
The goal of Tic Tac Toe is to be one of the player to get three symbols (X or O) in a row - horizontally, vertically or diagonally - on a 3 x 3 grid.
Overview
![Page 4: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/4.jpg)
There are two options for choosing opponent :
a) Human – Both players are humanb) Computer – First player is human &
second player is computer
There is another option to choose between two symbols (X or O) for playing.
Overview(cont.)
![Page 5: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/5.jpg)
O O
X
O O
Core logic - AI There are two core logics in this game – when both players are human, and when one is computer. The logic used for the AI is as follows:
First move:If the center is free, get the center.Otherwise, get any of the corners.
X
O
![Page 6: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/6.jpg)
X X O
O
Core logic - AI (Continued…)Second move:
Block user from winning.Opt for winning by applying the following logic: If the center is occupied by user, get any of
the corners.
O O
X
X O
![Page 7: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/7.jpg)
Core logic - AI (Continued…)Otherwise , the following cases
happen :
Case 1 :
If any situation arises like any of the above figure then the computer sets its symbol any one of the position among 2 ,4, 6 and 8.
X O
O O O
O X
![Page 8: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/8.jpg)
Case 2:
X
O O O
X
If any situation arises like any of the above figures then the computer sets its symbol at any position among 4 and 6.
X
O O O
X
X
O O O
X
Core logic - AI (Continued…)
![Page 9: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/9.jpg)
O
X O X
O
O
O X
X O
If any situation arises like any of the above figures then the computer sets its symbol at any position among 2 and 8.
O
X O
O X
Core logic - AI (Continued…)
Case 3:
![Page 10: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/10.jpg)
Case 4 : O X O
X O
O O
O O
X O
O X O
If any situation arises like any of the above figures then the computer sets its symbol at any position among 1, 3 ,7 and 9.
O X O
O X
O O
O O
O X
O X O
Core logic - AI (Continued…)
![Page 11: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/11.jpg)
O
X O
X O X
X X O
O O X
X O
Third and fourth move:Opt for winningBlock user from winningRandomly play a move.
O X
X O
X O
Core logic - AI (Continued…)
![Page 12: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/12.jpg)
For each move, check whether any 3 combination is occupied by any player and display the winner accordingly.
Core logic - Humans
![Page 13: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/13.jpg)
Limitations
• GUI is not so attractive.
• Only mouse interface is implemented, keyboard is not activated in the game.
![Page 14: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/14.jpg)
Future plan
•Keyboard functions will be added .
•We want to design more complex boards for the game in future.
![Page 15: Software Project](https://reader036.vdocuments.mx/reader036/viewer/2022070408/568143a9550346895db031e2/html5/thumbnails/15.jpg)
Thanks To All