This is a simple Python terminal Tic-Tac-Toe game, which runs in the Code Institute mock terminal on Heroku
Tic-Tac-Toe is a game in which two players seek in alternate turns to complete a row, a column, or a diagonal with either three O's or three X's drawn in the spaces of a grid of nine squares; noughts and crosses. // Google
- The first player will automatically be assigned "X" and starts the turn. Choose a number from 1 to 9. The turn then goes to player two who has been assigned "O". Repeat the same process.
- Automatically assigns you with a symbol, X or O.
- Accepts user input
- Input validaton and error-checking
- You cannot enter numbers outside the size of the grid
- You must enter numbers
- You can not enter the same number twice in the same round
-
Scoreboard
-
Play vs computer
-
- Git was used for version control by utilizing the Gitpod terminal to commit to Git and Push to GitHub.
-
- GitHub is used to store the projects code after being pushed from Git.
-
- Pythontutor helped me troughout and was a good tool to have when you got stuck.
-
- Heroku was used to host the project.
The PEP8 Validator were used to validate the project to ensure there were no syntax errors.
-
Python
- No errors were returned when passing through the PEP8 online validator
-
Tested that no invalid or out of bounds inputs are accepted.
-
Tested in my local terminal and the Code Institute Heroku terminal
- Getting an error when entering two invalid inputs after each other.
This project was deployed using Code Institute's mock terminal for Heroku.
-
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
By forking the GitHub Repository we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original repository by using the following steps...
-
Log in to GitHub and locate the GitHub Repository
-
At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.
-
You should now have a copy of the original repository in your GitHub account.
-
Log in to GitHub and locate the GitHub Repository
-
Under the repository name, click "Clone or download".
-
To clone the repository using HTTPS, under "Clone with HTTPS", copy the link.
-
Open Git Bash
-
Change the current working directory to the location where you want the cloned directory to be made.
-
Type
git clone
, and then paste the URL you copied in Step 3.
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
- Press Enter. Your local clone will be created.
$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
> Cloning into `CI-Clone`...
> remote: Counting objects: 10, done.
> remote: Compressing objects: 100% (8/8), done.
> remove: Total 10 (delta 1), reused 10 (delta 1)
> Unpacking objects: 100% (10/10), done.
Click Here to retrieve pictures for some of the buttons and more detailed explanations of the above process.
-
Got some inspiration by this article askpython
-
The algorithm to check win and draw function was taken from this here: YouTube
-
My Partner for supporting me.
-
Tutor support at Code Institute for their support.