bug fix : ai crash if the only legal move for the current player turn is to pass