Added better check for if it's the AI turn