At present the computer player will prioritise winning or blocking moves, but in fact if either is found (in that order) then there's no reason to continue looking at any other line.
A possible approach might be to factor out the line selection to a separate function which will fast return if a winner or blocker is found. Other than that it can continue to score lines and return the best