Giter Club home page Giter Club logo

xox-game's Introduction

XOX-GAME

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

Am I Responsive?

User Experience(UX)

User Stories:

  • 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.

How to Play

Start Screen

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 from the menu

select-1

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 from the menu

select-2

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.

message-invalid-username

If we choose 3 from the menu

select-3

If 3 is selected from the menu, you will be exited and this screen will be seen.

Features

Existing Features

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) choose-mark

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.

for row:

first-step

for column:

first-step-1

After the choice is made, we can see the sign placed on the game board.

merve-first

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.

computer-first

If the player wants to re-select a previously selected location, player will encounter a warning like the one in the picture below.

not-empty

If one of the players wins, the warning "{Username} Won / Computer Won" is printed on the screen.

won message

If the player loses, the warning "{username} lost " is printed on the screen.

lose message

If the game ends in a tie, "Game is tie!" appears on the screen.

game tie

Data Model

You can see the logical flow diagram here.

flowchart diagram

Future Features

  • 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.

Testing

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.

python-validation

Bugs

Solved Bugs:

  • 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.

Unsolved Bugs:

There are no unfixed bugs found on the project.

Technologies Used

  • 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

Deployment

Deployment of the project

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

Cloning of the Project

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.

Credits

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.

Acknowledgements

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.

xox-game's People

Contributors

mervecoskunn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.