Skip to content

About

A simple console-based Tic-Tac-Toe game written in C, featuring two-player mode and player vs. computer mode.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Tic-Tac-Toe in C

A simple console-based Tic-Tac-Toe game written in C.
It supports:

  • Two-player mode (Player 1 vs Player 2)
  • Single-player mode (Player vs Computer)

Features

  • Interactive board displayed in console
  • Input validation for moves
  • Randomized computer moves
  • Option to replay after each game

How to Run

  1. Clone this repository:

    git clone https://github.com/your-username/tic-tac-toe-c.git
    
  2. Navigate into the project folder:

    cd tic-tac-toe-c
  3. Compile the program:

    gcc tictactoe.c -o tictactoe
  4. Run the game:

    ./tictactoe

Example Board

 X | O | X
---|---|---
 O | X |  
---|---|---
   |   | O

About

A simple console-based Tic-Tac-Toe game written in C, featuring two-player mode and player vs. computer mode.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages