Skip to content

MrPC7/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

48dc2a9 · Aug 10, 2023

History

1 Commit
Aug 10, 2023
Aug 10, 2023
Aug 10, 2023

Repository files navigation

Tic-Tac-Toe-Game

This is a simple command-line implementation of the classic Tic Tac Toe game in C++

How to Play

  1. Run the program in a C++ compiler.

  2. A 3x3 Tic Tac Toe board will be displayed.

  3. The first player will be X. They will be prompted to enter a row (1-3) and a column (1-3) to place their mark.

  4. The second player will be O. They will be prompted to enter a row (1-3) and a column (1-3) to place their mark.

  5. The game will continue until one player wins by getting three in a row, or there is a tie (match drawn).

  6. The program will display the winning player or a message indicating a match draw.

Features

  • Displays the Tic Tac Toe board and prompts players to enter their moves.

  • Checks for valid moves and prevents players from selecting an already occupied spot.

  • Alternates players after each turn.

  • Checks for a win or a draw and ends the game accordingly.

Limitations

  • This is a command-line implementation and does not have any graphical user interface.

  • The game is limited to two human players.

  • The code does not include any tests or error handling.

Future Improvements

  • Implement a graphical user interface using a library such as SDL or SFML.

  • Add support for playing against a computer opponent.

  • Implement unit tests and error handling to improve code robustness.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages