Error with AI never ending turn