Code Monkey home page Code Monkey logo

tic-tac-toe-game's Introduction

Tic-Tac-Toe-Game

Build Status

Tic Tac Toe Game writen in Python.

Game Rules

Let's talk a little bit about the rules of Tic-Tac-Toe:

In Tic-Tac-Toe, two players try to fill a row,  a column, the diagonal, or the antidiagonal of a 3x3 game board.

This will be our game board:

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |

The user will enter an integer from 1 to 9 (inclusive) to select the position on the board.

On each turn, each player will select a particular position on the board and his/her marker will be added to that position.

We will have a human player playing against the computer player, which will select a random position.

If the player selects a position that is already taken, he/she loses the turn.

When a row,  a column, the diagonal, or the antidiagonal is full with the player's markers, the game is over and that players wins the game.

If the board is full but none of the players has won the game, then there is a tie.

When the game is over, we will ask the user if he/she would like to continue playing. We will take user input and start a new round if the player chooses to continue the game.

tic-tac-toe-game's People

Contributors

reddickk avatar flirtara 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.