Giter Club home page Giter Club logo

tic-tac-toe-python's Introduction

Simple Tic-Tac-Toe

View the live project here.

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

How to play

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

Features

  • 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

Features to be added

  • Scoreboard

  • Play vs computer

Technologies Used

Languages Used

Frameworks, Libraries & Programs Used

  1. Git

    • Git was used for version control by utilizing the Gitpod terminal to commit to Git and Push to GitHub.
  2. GitHub:

    • GitHub is used to store the projects code after being pushed from Git.
  3. Pythontutor

    • Pythontutor helped me troughout and was a good tool to have when you got stuck.
  4. Heroku

    • Heroku was used to host the project.

Testing

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

Testing

  • Tested that no invalid or out of bounds inputs are accepted.

  • Tested in my local terminal and the Code Institute Heroku terminal

Known Bugs

  • Getting an error when entering two invalid inputs after each other.

Deployment

Heroku

This project was deployed using Code Institute's mock terminal for Heroku.

  1. Fork or clone this Repository

  2. Create a new Heroku app

  3. Set the buildbacks to Python and NodeJS in that order

  4. Link the Heroku app to the repository

  5. Click on deploy

Forking the GitHub Repository

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

  1. Log in to GitHub and locate the GitHub Repository

  2. At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.

  3. You should now have a copy of the original repository in your GitHub account.

Making a Local Clone

  1. Log in to GitHub and locate the GitHub Repository

  2. Under the repository name, click "Clone or download".

  3. To clone the repository using HTTPS, under "Clone with HTTPS", copy the link.

  4. Open Git Bash

  5. Change the current working directory to the location where you want the cloned directory to be made.

  6. Type git clone, and then paste the URL you copied in Step 3.


$ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

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

Credits

Code

  • Got some inspiration by this article askpython

  • The algorithm to check win and draw function was taken from this here: YouTube

Acknowledgements

  • My Partner for supporting me.

  • Tutor support at Code Institute for their support.

tic-tac-toe-python's People

Contributors

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