Java TicTacToe, running an algorithm to never lose