Skip to content

Muhammad-Ahmed-Chorahi/Tic-Tac-Game-OPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game Using Object-Oriented Programming (OOP)

This is a simple implementation of the classic Tic Tac Toe game using OOP principles in C++.

Description

The game allows two players to take turns marking spaces on a 3x3 grid to try and achieve a winning pattern (three of their symbols in a row, column, or diagonal) before the opponent does. Players take turns until one player wins, the game ends in a draw, or the grid is filled.

Features

  • Players can choose their symbols (e.g., 'X' or 'O').
  • The game checks for win conditions after each move.
  • If a player wins, the game announces the winner.
  • If the game ends in a draw, it announces the draw.
  • Players are prompted to input the position they want to mark on their turn.
  • Positions on the board are validated to ensure they are not already occupied.

Usage

  1. Compile the source code using a C++ compiler.
  2. Run the executable file.
  3. Enter the symbol for player 1 and player 2.
  4. Players take turns entering the position to place their symbol.
  5. The game ends when one player wins, the game ends in a draw, or the grid is filled.

Installation

To play the game, you need to compile the source code using a C++ compiler. You can download and install a C++ compiler from various sources, such as GCC, Clang, or Visual C++.

Contributing

Contributions are welcome! If you want to contribute to this project, you can fork this repository and submit a pull request with your changes. Please make sure to follow the coding standards and write clear commit messages.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages