/// <summary> /// Creates two new random hole cards /// </summary> /// <param name="excludedCards">The cards the hole cards can't contain</param> /// <returns>New random hole cards</returns> public static HoleCards Random(CardCollection excludedCards = null) { if (excludedCards != null && excludedCards.Count + 2 > Hand.TotalCards) { throw new ArgumentException("Not enough cards left after excluding cards", nameof(excludedCards)); } return(new HoleCards(CardCollection.RandomAsUlong(2, excludedCards))); }
/// <summary> /// Creates a random board. /// </summary> /// <param name="progress">The progression of the board. Specifies how many cards are on the board.</param> /// <param name="deadCards">Dead cards. Specifies all cards that can't be contained on the board such as hole cards or boxed cards.</param> /// <returns>A random board according to the parameters</returns> public static Board Random(Progression progress = Progression.River, CardCollection deadCards = null) { return(new Board(CardCollection.RandomAsUlong((int)progress, deadCards))); }
internal void DealRandomCards(Progression targetState, ulong deadCards = 0UL) { _cards.Include(CardCollection.RandomAsUlong(targetState - Progress, deadCards | _cards.Binary)); }