An open API service indexing awesome lists of open source software.

https://github.com/ak-pawar3125/internpe-task3


https://github.com/ak-pawar3125/internpe-task3

cpp

Last synced: 9 months ago
JSON representation

Awesome Lists containing this project

README

          

# InternPe-Task3

# Tic-Tac-Toe Game 🎮

A simple Tic-Tac-Toe game built in C++ that allows two players to play alternately. The game includes a well-structured board with horizontal dividers for better readability and announces the winner or a draw at the end.

# 🚀 Features

✅ Two-player game (Player O vs. Player X)

✅ Validates player moves to prevent overwriting existing positions

✅ Checks for winning conditions dynamically

✅ Displays a structured grid format with horizontal lines for clarity

✅ Option to restart the game after completion

# 🎯 Game Rules

The game starts with Player O.

Players take turns placing their marker (O or X) on the board.

A player wins if they align three markers in a row, column, or diagonal.

If the board is full without a winner, the game ends in a draw.

Players can choose to restart the game after a round.

# 📌 Sample Output

O | X | O

-----------

X | O | X

-----------

O | X | O

Congratulations! Winner is O