added code to make sure that the computer's second turn is never frivolous