Package javatro.core

Class HandResult

java.lang.Object
javatro.core.HandResult

public class HandResult extends Object
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 Details

    • HandResult

      public HandResult()
  • Method Details

    • evaluateHand

      public static PokerHand evaluateHand(List<Card> cards) throws JavatroException
      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