This document describes a Tic Tac Toe game project created in Python. It includes the project description, game rules, implementation methodology, algorithm, game description, screenshots, and applications. The game is played on a 3x3 grid where two players take turns marking spaces with X or O symbols. The first player to get 3 of their marks in a row horizontally, vertically, or diagonally wins the game. The project uses data structures and functions to track the game state and validate wins or ties at the end of each turn.
This document describes a Tic Tac Toe game project created in Python. It includes the project description, game rules, implementation methodology, algorithm, game description, screenshots, and applications. The game is played on a 3x3 grid where two players take turns marking spaces with X or O symbols. The first player to get 3 of their marks in a row horizontally, vertically, or diagonally wins the game. The project uses data structures and functions to track the game state and validate wins or ties at the end of each turn.
This document describes a Tic Tac Toe game project created in Python. It includes the project description, game rules, implementation methodology, algorithm, game description, screenshots, and applications. The game is played on a 3x3 grid where two players take turns marking spaces with X or O symbols. The first player to get 3 of their marks in a row horizontally, vertically, or diagonally wins the game. The project uses data structures and functions to track the game state and validate wins or ties at the end of each turn.
This document describes a Tic Tac Toe game project created in Python. It includes the project description, game rules, implementation methodology, algorithm, game description, screenshots, and applications. The game is played on a 3x3 grid where two players take turns marking spaces with X or O symbols. The first player to get 3 of their marks in a row horizontally, vertically, or diagonally wins the game. The project uses data structures and functions to track the game state and validate wins or ties at the end of each turn.
Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1/ 15
TIC TAC TOE GAME
SUBMITTED TO: SUBMITTED BY:
P.SANTHIYA A.NUHANA PRABHAVATHY BTECH[AIML]-1ST YEAR INDEX • PROJECT DESCRIPTION • GAME RULES • IMPEMENTATION METHODOLOGY • ALGORITHM • GAME DESCRIPTION • GAME PLAY • SCREENSHOTS • APPLICATIONS • CONCLUSION PROJECT DESCRIPTION Tic tac toe Python, also known as Noughts and Crosses or Xs and Os, is a very simple two-player game where both the player get to choose any of the symbols between X and O. This game is played on a 3X3 grid board and one by one each player gets a chance to mark its respective symbol on the empty spaces of the grid. Once a player is successful in marking a strike of the same symbol either in the horizontal, vertical or diagonal way as shown in the picture below is created that player wins the game else the game goes on a draw if all the spots are filled . GAME RULES • Tic Tac Toe is an old paper and pencil game for two players, X and O, who take turns marking the spaces in a 3x3 grid. • Each player takes a turn placing his character (X or O) into one of the nine squares • A player cannot place his symbol in a square that is already occupied by a symbol • The game ends when a player creates a winning combination of his symbols or when there are no empty squares remaining • The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner • When the board fills up with neither player winning, the game ends in a draw • It is up to the players who starts first and which mark they have. IMPLEMENTATION METHODOLOGY
THE GAME IS PLAYED ON A GRID THAT'S
3 SQUARES BY 3 SQUARES. YOU ARE X , YOUR FRIEND (OR THE COMPUTER IN THIS CASE) IS O . PLAYERS TAKE TURNS PUTTING THEIR MARKS IN EMPTY SQUARES. THE FIRST PLAYER TO GET 3 OF HER MARKS IN A ROW (UP, DOWN, ACROSS, OR DIAGONALLY) IS THE WINNER. ALGORITHM Step 1: Designing the Tic Tac Toe Python Project. Step 2: Using the Data Structure to Store Data. Step 3: To Understand the Game-Loop. Step 4: Updating the Game Information. Step 5: To Validate the Win or Tie Situation. Step 6: Switching Between the Player Once the Chance of One Player is Executed. Step 7: Recording the Player's Names to Observe on the Scoreboard. Step 8: To Capture the Game Information. Step 9: To Design the Scoreboard. Step 10: Outer Loop to Make our Game Flexible and Allow Multiple Games of Tic Tac Toe Python to be Played. Step 11: To Handle Exception and Allot the Selection of the Symbol for the Current Player for Each Iteration of the Game. Step 12: Execution of the Tic Tac Toe Python Game and Updating the Scoreboard Simultaneously. Step 13: Swapping the Chance Given to Choose the Symbol Between the Selecting Player. Step 14: It's Gameplay Time. GAME DESCRIPTION • We shall start by designing the tic tac toe Python grid for which we shall be using the command line interface as implementing tic tac toe in Python using CLI comes in handy. We shall be using the user-defined function and print statements in Python. • Then we shall be using the Data Structure to Store Data using the user-defined function in Python as it's very important to understand the dynamics of the game. For this, we shall be knowing about two parts that are, The Status of the Grid and The move of each player. • After this we need to understand the game loop where we shall understand if the player has played their move without any exceptions. • Then we all implement the information about the game from time to time to record what is the status of the game. • It's very important to mark out the win or lose situations for which we should be creating a user-defined function in Python and will be implementing if statements in Python to check if after every move the game has been won or tied by any player. • As this game is between two players our program needs to understand the same for we shall be using loops in Python to make this tic tac toe Python game give the player its chance alternatively. • In this step we shall be capturing the names of the player as we want our tic tac toe Python project to showcase a proper scorecard at the end of the game to display the name of the winner alongside. • After every move by the player we need to record the available chances the player holds to avoid any mismanagement by our tic tac toe Python project. • As we want to showcase the Winner of the game at the end, we will be recording the points earned by each player and creating a scoreboard around it we need to create that in this step. • We need our tic tac tor Python project to be flexible enough to allow the player to play as many matches as they want hence we shall be creating an outer loop of the game in this step. • After each alternative chance as we want our code to handle and store the selection of the current player we shall be using the try-exception block in Python to handle any exception if encountered for the selection of the player inputs. • The final step is to execute our entire program to help both the player play the game and record their victories too. GAME PLAY SCREENSHOTS SCREEN SHOTS APPLICATIONS Effects of predictability and importance on acoustic prominence in language production. A pedagogical tool for teaching the concepts of good sportsmanship and the branch of good sportsmanship . The branch of artificial intelligence that deals with the searching of game trees. CONCLUSION • Tic tac toe Python, also known as Noughts and Crosses or Xs and Os, is a very simple two-player game where both the player choose between the symbol 'X' and 'O' to mark the position on a 3X3 grid. Once a player is successful in marking a strike of the same symbol either in the horizontal, vertical, or diagonal way that player wins the game else the game goes on a draw if all the spots are filled. • We can access the above data from the Status of Grid which requires us to pass over the information every time we need to know the positions of each player. This is generally done by conserving time via the Time versus Space Complexity Trade-off. • The player_current variable that we used was to store the move of the current player as 'X' or 'O' in the tic tac toe in Python. THANK YOU