Tic Tac Toe

This is one of my projects where I had a more dubious approach. The code is really long, tiresome, and unnecessary. The problem is that I used arrays for the game, which in itself is not the mistake, but the way they were used. I did not make the game first, I made the bot first and then tried to make the game work around it. This was an issue, but the game does run and it even works and executes perfectly well. The only issue is that if the board gets filled, some test cases may cause the code to give wrong results. On the brighter side, it was yet another success where a bot plays the human in a game.

As can be seen, decent user interface, easy to play bot and a working game. The issue however will be seen in the source code part of which I will attach the screen shot. The result must be printed when 3 diagonals or verticals or horizontals are connected with the same character. This sounds easy, and it is, only for the first 2 test cases. When I manually tried to do this for each test case, the code took a turn for the worse.

So, it is not really the best, but I really can not turn it down after all this. In hindsight, it is one of the more successful mistakes. Again, some particular test cases are only not working. Most of the game would run smoothly without any bugs or output issues.