XOX-GAME This project is a game project. It is a popular game also known as tic-tac-toe-game. XOX-GAME is run and played within the terminal. The system runs on a mock terminal through Heroku It is a game that can be played 3 times between the computer and one player and results in winning, drawing or losing. Click here to play the game: XOX-GAME
- As a user, I want to be able to easily understand the purpose of the site when I open it.
- As a user, I want to easily access and understand the rules I need to follow.
- As a user, I want to easily navigate between steps on the game.
- As a user, I want to start the game easily and access the gameboard without any problems.
- As a user, I want to easily move on to the next steps with necessary warnings and explanations after the moves you make.
- As a user, you have the right to play this game 3 times, see the result at the end of the game and start the next game easily.
When we click on the live link XOX-GAME to start the game, we are greeted with this start screen. We see a menu that will help guide us, and we proceed by typing a number between 1 and 3 to select the option we want.
If we choose 1. The rules tab will open and we can see the rules of the game as shown in the picture above.
If we choose 2, the game will start and ask us to enter a username. If an invalid character is entered, we will see a warning message on this screen.
If 3 is selected from the menu, you will be exited and this screen will be seen.
After entering the username, the next step is to start the game and a choice is made between X and O(we use letter O, it is not a number)
After the sign is selected, the computer and the user randomly choose who will start playing first and the game begins.
Then, who will play first is written on the screen, and if the player is selected to make the first move, after the initial score information is given, player is asked for information on which cell player will tick on the game board and the choice is made.
After the choice is made, we can see the sign placed on the game board.
If the computer is going to play first, a message is given that the computer will play, then the move is passed to the other player.
If the player wants to re-select a previously selected location, player will encounter a warning like the one in the picture below.
If one of the players wins, the warning "{Username} Won / Computer Won" is printed on the screen.
If the player loses, the warning "{username} lost " is printed on the screen.
If the game ends in a tie, "Game is tie!" appears on the screen.
You can see the logical flow diagram here.
- More players may be included.
- If we want to extend the game time, we can increase our playing rights, which are currently 3, to the desired number later.
- We can add more cells to the game board.
- We can make a different arrangement of the game by creating difficulty levels.
The steps I followed while testing my project were as follows:
- Tested in the local terminal and the Code institute Heroku Terminal.
- Testing the programs code in pep8online and confirmed that there were no errors with the code.
- I experimented by making choices that were outside the rules of the game and tested whether the game showed us the necessary warnings and allowed us to continue with the right steps.
- Testing the programs code in pep8online and confirmed that there were no errors with the code.
- We noticed that in some cases it could not place a mark on the targeted cell and it was fixed.
- No matter who wins on the score board, the score is added to the computer. It has been solved.
- The player name written on the score board was not synchronized with the entered name input. It was fixed.
- Some warning messages in the game have been replaced with more meaningful and appropriate versions of the situation.
- When player went to the next step while playing the game, the screen was cleared and I saw that it was very fast and difficult to understand and follow for people playing for the first time, so I removed the command given to clear the previous steps from the screen.
There are no unfixed bugs found on the project.
- Github- The site was used to edit and host the website.
- GitPod- Used in the deployment and creating the website.
- Python- This was used in the production to get the game running as it is required for the app to run.
- Node.js - This was used in the production to get the game running as it is required for app to run.
- pep8online- This site was used to validate the python code to check for any errors within my writing.
- Heroku- This was used to deploy the game in a mock terminal that allows anyone to play the game online.
- ASCII ART- We used this as the logo when starting the game.(Font name: Crazy)
- Animation- We used this to animate the Python terminal loading source code.
- Diagram.io - Used to create flow chart
I deployed this project with Heroku, a cloud platform, using the credits provided by Code Institute to our students.
To deploy this project I used the following steps in Heroku:
- Fork or clone a copy of this repository.
- Log in or create an account in heroku.
- Click on the button in the right corner to create a new app.
- Inside the app page, go to setting page (underlined in green) and set the buildpacks to "Python" and "Nodejs" in that order (like in the picture below).
- Link the heroku app to the repository.
- Go back to the deploy page (underlined in yellow) and you can either choose to manually deploy the site or automatically.
- Once it has deployed, it may take a fww minutes to load and you can play the game.
- The link to the page to play the game can be found here - XOX-GAME
To create a local clone of the project, follow the steps below:
- In the GitHub repository, under the repository name there is a code tab., click on the code tab.
- In the clone tab, click the HTTPS tab. Within this section, click on the clipboard icon and copy the URL supplied for the repository.
- Open an IDE of your choosing and run Git Bash.
- Change the current working directory to the location of which you wish to place the cloned repository.
- In the terminal, write Git Clone and then paste in the URL supplied via GitHub from step 2.
- Press enter and your new cloned repository will be created within the desired location.
1. [ASCII ART](https://patorjk.com/software/taag/#p=display&f=JS%20Bracket%20Letters&t=XOX)- We used this as the logo when starting the game.(Font name: Crazy).
2. [Animation](https://medium.com/@joloiuy/creating-captivating-terminal-animations-in-python-a-fun-and-interactive-guide-2eeb2a6b25ec)- We used this to animate the Python terminal loading source code.
This project is my 3rd Portfolio Project for the Full Stack Software Developer (e-Commerce) Diploma course provided by the Code Institute. I would like to thank my mentor Precious ljege who helped me while developing my project.