src/PokerHand.java
public int hasQuad() {
		LinkNode<Card> ref = head;
		while (ref != null) {
			// Check if there exists next
			if (ref.getNext() != null)
				// Compare rank with next
				if (ref.getData().compareRank(ref.getNext().getData()) == 0)
					// Check if there exists next next
					if (ref.getNext().getNext() != null)
						// Compare rank with next next
						if (ref.getNext().getData().compareRank(ref.getNext().getNext().getData()) == 0)
							// Check if there exists next next next
							if (ref.getNext().getNext().getNext() != null)
								// Compare rank with next next next
								if (ref.getNext().getData()
										.compareRank(ref.getNext().getNext().getNext().getData()) == 0)
									return ref.getData().getRank().getValue();
			ref = ref.getNext();
		}
		return 0;
	}
// HasQuad method returns the rank of the quad
HasQuad method returns the rank of the quad
HasQuad method returns the rank of the quad
public int hasQuad() {
		LinkNode<Card> ref = head;
		while (ref != null) {
			if (ref.getNext() != null)
				if (ref.getData().compareRank(ref.getNext().getData()) == 0)
					 next
					if (ref.getNext().getNext() != null)
						 next
						if (ref.getNext().getData().compareRank(ref.getNext().getNext().getData()) == 0)
							 next next
							if (ref.getNext().getNext().getNext() != null)
								 next next
								if (ref.getNext().getData()
										.compareRank(ref.getNext().getNext().getNext().getData()) == 0)
									return ref.getData().getRank().getValue();
			ref = ref.getNext();
		}
		return 0;
	}
public int hasQuad ( ) { LinkNode < Card > ref = head ; while ( ref != null ) { if ( ref . getNext ( ) != null ) if ( ref . getData ( ) . compareRank ( ref . getNext ( ) . getData ( ) ) == 0 ) if ( ref . getNext ( ) . getNext ( ) != null ) if ( ref . getNext ( ) . getData ( ) . compareRank ( ref . getNext ( ) . getNext ( ) . getData ( ) ) == 0 ) if ( ref . getNext ( ) . getNext ( ) . getNext ( ) != null ) if ( ref . getNext ( ) . getData ( ) . compareRank ( ref . getNext ( ) . getNext ( ) . getNext ( ) . getData ( ) ) == 0 ) return ref . getData ( ) . getRank ( ) . getValue ( ) ; ref = ref . getNext ( ) ; } return 0 ; }
HasQuad method returns the rank of the quad
HasQuad method returns the rank of the quad
// Check if there exists next // Compare rank with next // Check if there exists next next // Compare rank with next next // Check if there exists next next next // Compare rank with next next next