Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe in C++

Tic Tac Toe

This project is a console-based implementation of the classic Tic-Tac-Toe game, developed in C++. It allows two players to compete against each other in a fun and interactive way. The game features a simple user interface and includes essential game mechanics such as turn-taking, win detection, and draw conditions.

Features

  • Two-player gameplay: Players can take turns marking their moves on a 3x3 grid.
  • Win and draw detection: The game checks for winning combinations and announces the result.
  • User-friendly interface: Clear prompts guide players through their moves, making it easy to play.

Getting Started

To run this project locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/alishbannoor2/Tic-Tac-Toe.git
    cd Tic-Tac-Toe
  2. Create a new project in Visual Studio:

    Open Visual Studio and create a new C++ project. Add the existing source files (Tic-Tac-Toe.cpp, ClientCode.cpp, and Tic-Tac-Toe.h) to the project.

  3. Build the project:

    In Visual Studio, go to Build in the menu and select Build Solution (or press Ctrl + Shift + B).

  4. Run the game:

    After building, you can run the program by clicking the Start button (or press F5).

How to Play

  1. Start the game and enter the names of the two players.
  2. Players take turns entering the box number (0-8) to mark their move.
  3. The game will display the updated board after each turn.
  4. The game ends when a player wins or if there is a draw.

Contributing

Contributions are welcome! If you have suggestions for improvements or new features, feel free to fork the repository and submit a pull request.

About

This project is a simple yet engaging implementation of the classic Tic-Tac-Toe game using C++. Designed for both beginners and enthusiasts, it showcases fundamental programming concepts such as object-oriented programming (OOP), game logic, and user interaction through the console.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages