skull444112 / Tic-Tac-Toe-Game-in-Python

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

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.


Languages

Language:Python 100.0%