@Override
    public int compare(FiveCardPokerHand o1, FiveCardPokerHand o2) {
        if (!o1.isFull() && !o2.isFull()) {
            return 0;
        }
        if (!o1.isFull()) {
            return 1;
        }
        if (!o2.isFull()) {
            return -1;
        }
        
        PokerHandTypeComparator handTypeComparator = new PokerHandTypeComparator();
       
        int handTypeComparison = handTypeComparator.compare(o1, o2);
        
        if (handTypeComparison != 0) {
            return handTypeComparison;
        }
        // If we are here, we know that the hands must be of the same type.
        PokerHandType handType = o1.getHandType(); 
        
        SameHandTypeComparator sameHandTypeComparator = new SameHandTypeComparator(handType);
        
        return sameHandTypeComparator.compare(o1, o2);
    }