Tic tac toe using magic squares

I did the tic tac toe game using the concept of magic squares!
If you think it is a bad way of doing it , please let me know!
Though I tested it a lot of times I am not sure If it is bug free , so please let me know if there are bugs in the game.
I would love to hear from you!!

Thanks in advance!

It doesn’t recognize when the player is winning. Only when the computer wins.

Maybe because the player can never win! I tried … but the player would never win!

Thanks for the suggestion however.I will include that too!

Player is X:

omg! I thought the program would always win! I will look into it !!! thank you so ,much for the feedback and the time you took !!

I have overcome the possibility of the user winning in the way that you have won.Hope that fixed the problem.Check it out now and let me know if there are bugs now! I would really be grateful!