solveHand static method

Hand solveHand(
  1. List? cards, [
  2. Game? game,
  3. bool canDisqualify = true
])

Implementation

static Hand solveHand(List<dynamic>? cards,
    [Game? game, bool canDisqualify = true]) {
  game = game ?? Game('standard');
  cards = cards ?? [''];

  var hands = game.handValues;
  late Hand result;

  for (var handType in hands) {
    result = solveHandType(handType, cards, game, canDisqualify);
    if (result.isPossible) {
      break;
    }
  }

  return result;
}