Smart AI

It's basically medium AI, but it checks if there is a winning move. Also fixed issues with ties

I can't beat it. Seriously I can't.