View Source UnoClone (uno_clone v0.1.0)
Provides functions for creating and handling a deck of uno cards.
Link to this section Summary
Functions
Returns a boolean value indicating if card is within deck.
Returns an array of cards by combining all available value cards and extra cards.
Returns an array of all extra cards.
Creates a deck and shuffles the cards within. Function then returns a tuple of {hand, rest}. The hand_size will determine the amount of cards dealt from a deck.
Returns an array of cards representing cards with a value for all colors available.
Returns a tuple of {hand, rest}. The hand_size will determine the amount of cards dealt.
Loads a deck from a file with the filename.
Save the deck in a file with the filename given.
Returns an array of shuffled cards.
Link to this section Functions
Returns a boolean value indicating if card is within deck.
examples
Examples
iex> deck = UnoClone.create_deck()
iex> UnoClone.contains?(deck, "1 of Red")
true
Returns an array of cards by combining all available value cards and extra cards.
Returns an array of all extra cards.
Creates a deck and shuffles the cards within. Function then returns a tuple of {hand, rest}. The hand_size will determine the amount of cards dealt from a deck.
examples
Examples
iex> {hand, _remainingDeck} = UnoClone.create_hand(4)
iex> hand
Returns an array of cards representing cards with a value for all colors available.
Returns a tuple of {hand, rest}. The hand_size will determine the amount of cards dealt.
examples
Examples
iex> deck = UnoClone.create_deck()
iex> {hand, _deck} = UnoClone.deal(deck, 1)
iex> hand
["0 of Green"]
Loads a deck from a file with the filename.
Save the deck in a file with the filename given.
Returns an array of shuffled cards.