Tic Tac Toe with 3D and working win condition algorithms