/Tic-tac-toe

Simple text based Tic-tac-toe

Primary LanguageC++

A project to create a simple text based version of tic-tac-toe. This code was written in C++11, done in Microsoft Visual Studio 2019.

Features of the present code :

  1. A 3x3 matrix of numbers, that is replaced with either "X" or "O", alternating between the two every turn.
  2. Numbers are replaced every turn by user input.
  3. Victory Conditions (Horizontal, Vertical , Diagonal) are checked every turn to declare a winner, Maximum of 9 turns.

Known bugs :

  1. User input allows players to overwrite other player's moves, ie, X's can be overwritten as O's the next turn and vice-versa.
  2. If there is no winner at the end of 9 turns, game abruptly ends.(Not exactly a bug, I just forgot lol)

As of now, no functions are used in the code. I plan to make parts of the code into functions to be reused. Any help is appreciated!