Let's PLAY - 20240728 - 123124 - 0000

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

LET'S PLAY

TIC TAC
TOE
A Classic Game Of Strategy

Presented By
Ch.Pavan Kumar
K.Pravalika
J.Abhinaya
K.Divya
Ch.Dhanalxmi
Introduction:
TIC-TAC-TOE is a very popular game, so let's implement an
automatic tic-tac-toe game using python.

Our presentation is to implement the TIC-TAC-TOE game


which will features like single player and two players
modes. In single player modes we have used game theory
logies like minimax algorithms to determine the best move
that the computer plays.
What Is Tic Toc Toe:
TIC-TAC-TOE. game is an very Easy game which is mostly played
among children and to also helps them to improve their
concentration.

The objective of this TIC-TAC-TOE game python project is to build a


tic-tac- toe game so you can play it without wasting paper and
improve your concentration To build this gamewe use the thinker
module with concept of python.

To play this game we require two players to play one is X and the
other is O and the both players play by putting their marks in empty
squares.

To win the game players have to get 3 of the marks in a row (up, down,
across or diagonally.
Steps To Develop Tic Tac Toe Game Using Python

Creating The Board

Creating the players

Creating the classic player


Creating the random player (computer)
Finding the winner
Flow Chart:

Creating The Board

Creating Players

Creating the classic player

Creating the random player


(computer)

Finding The Winner


1.Creating The Board

We are going to create the board of the game.


Firstly, define the main function, which will contain
all the game’s code

2.Creating Players

The game has 2 players:


the player who uses the “O” symbol and
the random player (computer) who uses the “X” symbol.
3.Creating the classic player

Define the function with the board as argument.


This function takes as input from the player

If the row and column numbers are valid but the square of the board
is not empty, print an appropriate message and repeat the above
process

Lastly, if the player chooses a valid square, return the


row and column numbers.
4.Creating the random player (computer)

1.Define the function play_random() with the board as argument.


This function finds all the possible moves and stores the row
and the column numbers of the valid squares in the list
possible_moves.
2. Then it randomly selects one of the valid squares and returns
the row and column numbers of the selected square.
5.Finding The Winner

The last step of the game is to find the player that won. A
player wins, if they succeed in placing three of their marks
in a diagonal, horizontal, or vertical row.

Firstly, define the function check_winner(), which takes as


argument the board of the game and uses the functions
check_row(), check_column(), check_diagonals() to
determine if a player won.
Advantages Of Game

1. Teaches strategy skills.


2. Develops logical thinking.
3. Teaches the importance of rules.
4. Improves the ability to concentrate and focus.
5. Sets the foundation for learning more complex games.
Required Specification

Hardware Requirement Software Requirement

Front end: python 3


Processor-intel core i3 or above
Back end: python 3.6.0 interpreter
HARD DISK-128GB
Graphical user interface (GUI) toolkit
Memory-1GB RAM
Conclusion

Tic-tac-toe game is most familiar among all the age groups.


Intelligence can be a property of any purpose-driven
decision maker. This basic idea has been suggested many
times. An algorithm of playing tic-tac-toe has been
presented and tested that works in efficient way. Overall
the system works without any bugs.
Thank You

You might also like