Coder Social home page Coder Social logo

skull444112 / tic-tac-toe-game-in-python Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4 KB

Welcome to my Tic Tac Toe game implemented in Python! This is a simple game where you play against the computer. The game is played on a 3x3 grid, and the first player to get three of their symbols in a row, column, or diagonal wins the game. My implementation of the game is written in Python and uses a command-line interface.

Python 100.00%
begginer begginer-friendly begginers game python python-beginners python3 simple simple-game tic-tac-toe

tic-tac-toe-game-in-python's Introduction

Tic-Tac-Toe-Game-in-Python

This is a simple Python project that implements the classic Tic-Tac-Toe game. You can play against the computer, which makes random moves. The game has a text-based user interface (TUI) that runs in the terminal.

Features

  • A 3x3 grid that shows the board state
  • A prompt that asks you to choose your symbol (X or O)
  • A prompt that asks you to enter the row and column numbers of your move
  • A message that displays the result of the game

Installation

To run this project, you need to have Python 3 installed on your system. You don’t need to install any external modules, as the project only uses the built-in random and os modules.

Usage

To start the game, you need to clone this repository and run the main.py file. You can do this by typing the following commands in your terminal:

# Clone this repository
git clone https://github.com/[your username]/Tic-Tac-Toe-Game-in-Python.git

Go to the project directory

cd Tic-Tac-Toe-Game-in-Python

Run the main.py file

python main.py

You will see a 3x3 grid and some prompts in the terminal. You need to choose your symbol (X or O) and enter the row and column numbers of an empty cell on the grid. The game will alternate between your symbol and the computer’s symbol. The first player to form a horizontal, vertical, or diagonal line of three symbols wins the game. If the grid is full and no one wins, the game is a draw.

tic-tac-toe-game-in-python's People

Contributors

skull444112 avatar

Stargazers

 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.