src/PokerHand.java
public int compareHighCard(PokerHand aHand) {
		LinkNode<Card> ref = tail;
		LinkNode<Card> anotherRef = aHand.tail;
		while (ref != null) {
			if (ref.getData().compareRank(anotherRef.getData()) != 0)
				return ref.getData().compareRank(anotherRef.getData());
			ref = ref.getNext();
			anotherRef = anotherRef.getNext();
		}
		// Return 0 after comparing ONE PAIR cases
		return 0;
	}
// This method works for every type of rankings.
This method works for every type of rankings.
This method works for every type of rankings .
public int compareHighCard(PokerHand aHand) {
		LinkNode<Card> ref = tail;
		LinkNode<Card> anotherRef = aHand.tail;
		while (ref != null) {
			if (ref.getData().compareRank(anotherRef.getData()) != 0)
				return ref.getData().compareRank(anotherRef.getData());
			ref = ref.getNext();
			anotherRef = anotherRef.getNext();
		}
		return 0;
	}
public int compareHighCard ( PokerHand aHand ) { LinkNode < Card > ref = tail ; LinkNode < Card > anotherRef = aHand . tail ; while ( ref != null ) { if ( ref . getData ( ) . compareRank ( anotherRef . getData ( ) ) != 0 ) return ref . getData ( ) . compareRank ( anotherRef . getData ( ) ) ; ref = ref . getNext ( ) ; anotherRef = anotherRef . getNext ( ) ; } return 0 ; }
This method works for every type of rankings.
This method works for every type of rankings .
// Return 0 after comparing ONE PAIR cases