Super Tic tac Toe is a Python terminal game, which runs in the Code Institute mock terminal on Heroku.
Users can try to beat the computer by matching 3 X's diagonally, vertically or horizontally on the Tic Tac Toe board before the computer matches 3 O's in the same positions described before.
Here is the live version of my project
Super Tic Tac Toe is based on the classic tic tac toe paper game. You can read more about it on Wikipedia
In this version, the player enters their name and a board is generate, so the player can choose where he will make his first movement.
Each position on the board has a number equivalent to the position you want to place your move.
The board starts at position 1 in the top left corner and ends at position 9 in the bottom right corner.
The user need to select a position from number 1 to number 9, press enter and the postion that the user want will be marked on the board.
The players and the computer take turns marking the spaces in a three-by-three grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.
The user will be represented by X and the computer by O.
-
Rules are shown to the user when game start for better guidance
-
Board is generated for user first movement
-
Play against the computer
-
Accepts user input
-
User can't enter coordinates outside the size od the board
-
User can't input letters or empty spaces instead of numbers on the board
-
User can't input the same guess twice
-
Add score to the game
I have manually tested this project by doing the following:
-
Passed the code through a PEP8 linter and confirmed there are no problems
-
Given invalid inputs: strings when numbers are expected, out of bounds inputs, same input twice
-
Tested in my local terminal and the Code Institute Heroku terminal
-
I couldnt invalidate users input if the user input empty spaces on the user name variable. I fixed by using the strip method.
-
When asked to play again the user was faced with the answer yes or no. If the user puts anything besides yes or no the code would collapse and give error messages. I find by adding a while statement with a lower method and a list containing "yes" and "no", if the user gives any different message from yes or no a message error is shown asking the user to use yes or no for answer.
I couldnt invalidate users input if the user input empty spaces on the user name variable. I fixed by using the strip method.
When asked to play again the user was faced with the answer yes or no. If the user puts anything besides yes or no the code would collapse and give error messages. I find by adding a while statement with a lower method and a list containing "yes" and "no", if the user gives any different message from yes or no a message error is shown asking the user to use yes or no for answer.
-
No bugs remaining.
-
No errors were returned from pep8ci.herokuapp.com
This project was deployed using Code Institute's mock terminal for Heroku.
Steps for deployment:
-
Fork or clone this repository
-
Create a new Heroku app
-
Set the buildbacks to Python and NodeJS in that order
-
Link the Heroku app to the repository
-
Click on Deploy
-
Code Institute for the deplyment terminal
-
Wikipedia for the details on the Batleship game