Package javatro.core
Class HandResult
java.lang.Object
javatro.core.HandResult
The `HandResult` class evaluates a poker hand based on the given cards. It supports hands with 1
to 5 cards and determines the best possible poker hand.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PokerHandevaluateHand(List<Card> cards) Evaluates the poker hand based on the given list of cards.
-
Constructor Details
-
HandResult
public HandResult()
-
-
Method Details
-
evaluateHand
Evaluates the poker hand based on the given list of cards.- Parameters:
cards- A list of cards to evaluate. Must contain between 1 and 5 cards.- Returns:
- A `PokerHand` object representing the evaluated hand.
- Throws:
IllegalArgumentException- If the input is null or contains fewer than 1 card.JavatroException
-