8000 GitHub - aasimsyed/tic-tac-toe
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

aasimsyed/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Tic Tac Toe

This is a simple Python program that lets two human players play a game of Tic Tac Toe directly in your terminal. The program guides players to take turns inputting their moves, displays a graphical representation of the game board, and reports the outcome once the game is over.

Features

  • Two-Player Game: Play a classic game of Tic Tac Toe with a friend.
  • Terminal-Based Graphical Board: The board is displayed using ASCII art, with empty cells numbered for easy move selection.
  • Turn-Based Input: Players take turns entering their moves.
  • Outcome Reporting: The game automatically checks for a win or a draw after each move and announces the result.

Getting Started

Prerequisites

  • Python 3.x must be installed on your system.

Installation

  1. Clone or download this repository.
  2. Ensure the main script is named tic-tac-toe.py.

Running the Game

  1. Open your terminal and navigate to the directory containing tic-tac-toe.py.

  2. Make the script executable by running:

    chmod +x tic-tac-toe.py
  3. Start the game by executing:

    ./tic-tac-toe.py
  4. Follow the prompts to play

How to Play

  1. Initial Board: When the game starts, you'll see a board with numbered positions corresponding to empty cells.
  2. Making a Move: Each player is prompted to enter a number (1-9) representing the cell where they want to place their mark.
  3. Winning the Game: The program checks after every move if a player has won (three marks in a row horizontally, vertically, or diagonally).
  4. Game Outcome: If a player wins, the program announces the winner. If all cells are filled with no winner, the program declares the game a draw.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0