Giter VIP home page Giter VIP logo

tic_tac_toe_py's Introduction

Super Tic Tac Toe

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

Presentation of Super Tic Tac Toe game in the Code Institute mock terminal on Heroku with several different screen sizes

How to play

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.

Features

Board generation

Presentation of Super Tic Tac Toe game in the Code Institute mock terminal on Heroku

  • 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

Input Validation and error-checking

Presentation of Super Tic Tac Toe game in the Code Institute mock terminal on Heroku showing a input error if user input a number smaller then 0, bigger then 9 and  letter instead of number on the board

  • 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

Presentation of Super Tic Tac Toe game in the Code Institute mock terminal on Heroku showing a input error if user input the same number on the board

Future Features

  • Add score to the game

Testing

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


Bugs

Solved Bugs

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

Presentation of Super Tic Tac Toe game in the Code Institute mock terminal on Heroku showing a input error if user input different answer from yes or no if wishes to play the game again

Remaining Bugs

  • No bugs remaining.


Validator Testing

PEP8

  • No errors were returned from pep8ci.herokuapp.com

Presentation of PEP8 website showing that there is no error on the python code inputed

Deployment

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


Credits

  • Code Institute for the deplyment terminal

  • Wikipedia for the details on the Batleship game

tic_tac_toe_py's People

Contributors

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