private computeHandValue function