@Cards-TS
    Preparing search index...

    Class FourCardRun

    A class representing a run (or straight flush) of at least four cards being in sequential order and of the same suit, potentially containing wilds

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cards: Card[]

    the cards to create using

    numWilds: number

    The number of wilds contained

    runType: number = 4

    Number to distinguish runs of this type from a three card set

    suit: Suit

    The suit that this four card run consists of

    type: "straight" = 'straight'

    Methods

    • Adds a card to this run

      Parameters

      • card: Card

        the card to add

      • moveWildTop: boolean = true

        whether (if applicable) to move a wild at that position to the top or to the bottom

      Returns void

    • Finds open spots that could be filled in by a non-wild card

      Returns Iterable<Rank>

      the available ranks

      [...FourCardRun(3S, 4S, 2S, 6S).findSpots()]
      > [5, 7]