Skip to content

A simple tictactoe game that runs in terminal, using C++

Notifications You must be signed in to change notification settings

prabesh6907/Simple-TicTacToe_Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Tic-Tac-Toe Game

This is a simple command-line Tic-Tac-Toe game implemented in C++. The game allows a human player to play against the computer. The computer makes random moves.

Features

  • Play against the computer
  • Simple command-line interface
  • Check for win and tie conditions

Getting Started

Prerequisites

To compile and run this project, you need to have a C++ compiler installed on your machine. You can use GCC, Clang, or any other standard C++ compiler.

g++ -o tic_tac_toe tictactoe.cpp

Running the Game

After compilation, you can run the game using:

./tic_tac_toe

How to Play

  • The game board consists of 9 spaces, numbered from 1 to 9.
  • The player is assigned the marker 'O' and the computer is assigned 'X'.
  • The player will be prompted to enter a spot to place their marker.
  • The computer will then make a random move.
  • The game checks for win or tie conditions after each move.

Contributing

If you have suggestions or improvements, feel free to submit a pull request or open an issue.

About

A simple tictactoe game that runs in terminal, using C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages