public boolean wins(Hand hand1, Hand hand2) {
        if (hand1 == null || hand2 == null) {
            return false;
        }

        int value1 = getHandValue(hand1);
        int value2 = getHandValue(hand2);

        if (value1 > value2 && value1 <= TWENTY_ONE) {
            return true;
        } else {
            return (value1 <= TWENTY_ONE && value2 > TWENTY_ONE);
        }
    }