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 :
- A 3x3 matrix of numbers, that is replaced with either "X" or "O", alternating between the two every turn.
- Numbers are replaced every turn by user input.
- Victory Conditions (Horizontal, Vertical , Diagonal) are checked every turn to declare a winner, Maximum of 9 turns.
Known bugs :
- 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.
- 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!