Git Product home page Git Product logo

exercise-tictactoe-cli-python's Introduction

Create a TicTacToe CLI using Python

You will practice:

  1. Python lists/arrays
  2. Creating a two dimensional matrix with Python
  3. Using the while loop to avoid your application from ending.
  4. Using conditionals.
  5. Implementing a CLI (command line interface).

๐Ÿ“ Instructions

Fill the content of the methods play, check_for_winner, new_game and the commands inside the while needed to make the TicTacToe behave like this picture.

def play(position):
def check_for_winner():
def new_game():
  1. There are two players X and O.
  2. X always starts playing.
  3. To make a play, the command its play <position> for example: play 1 will play for the current player on the position 1 in the list (the second one)
  4. If X makes a play, it's O's turn (automatically) and vice-versa.
  5. Every time aony player makes a play you have to check for winners.
  6. The game ends when any of the players finally makes a winning combination.
  7. The game can be reset (start again) any time.
  8. The user must stop the game and exit anytime (releasing the terminal).

๐Ÿ’ป Installation

  1. Clone this repository:
$ git clone https://github.com/breatheco-de/exercise-tictactoe-cli-python
  1. Run the app by typing on the terminal:
$ python3 app.py

exercise-tictactoe-cli-python's People

Contributors

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