Skip to content

matanate/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

Overview

This is a simple command-line Tic-Tac-Toe game implemented in Python. The game allows two players to take turns marking spaces on a 3x3 grid, and the first player to get three in a row wins. The game board is displayed in the console.

How to Play

  1. Run the script using a Python interpreter: python tic_tac_toe.py
  2. Players take turns entering their moves by choosing a position (e.g., "a1", "b2").
  3. The game continues until a player wins, or it's a draw.
  4. After the game ends, you can choose to play again or exit.

Game Controls

  • The game board is represented as follows:
    a     b     c
       |     |     
 1     |     |     
  _____|_____|_____
       |     |     
 2     |     |     
  _____|_____|_____
       |     |     
 3     |     |     
       |     |     
  • Players enter their moves by providing the position (e.g., "a1", "b2").
  • After each game, you'll be prompted to restart or exit.

Features

  • Player vs. Player mode.
  • Detection of wins and draws.
  • Restart the game after completion.

Contributing

Feel free to contribute or report issues on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python command-line Tic-Tac-Toe game.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages