adding turn counter and MAX_TURNS