Cards (tinpo_cards v0.1.0)
Provides methods for creating and handling a deck of Cards.
Link to this section Summary
Functions
This confirms with either Tue or False if a particular card is present or not in the deck.
Returns a list of strings representing a deck of playing cards.
Divides a deck into a hand and the remainder of the deck. The hand_size argument indicate how many cards should be in the hand.
You should ignore this as it has nothing to do with the project, but rather the result of failure to resist the urge to delete it.
Please ignore as it has no effect with the project. it is only a representation of wish to practice testing at the onset of this project.
Link to this section Functions
confirm(deck, card)
This confirms with either Tue or False if a particular card is present or not in the deck.
Examples
iex(1)> deck = Cards.create_deck
iex(2)> Cards.confirm(deck, "Ace")
false
iex(3)> Cards.confirm(deck, "Ace of Spades")
true
create_deck()
Returns a list of strings representing a deck of playing cards.
create_hand(hand_size)
handle(deck, hand_size)
Divides a deck into a hand and the remainder of the deck. The hand_size argument indicate how many cards should be in the hand.
Examples
iex(1)> deck = Cards.create_deck
iex(2)> Cards.handle(deck, 5)
iex(3)> {hand, deck} = Cards.handle(deck, 5)
iex(4)> hand
["Ace of Spades", "Two of Spades", "Three of Spades", "Four of Spades",
"Five of Spades"]
hello()
You should ignore this as it has nothing to do with the project, but rather the result of failure to resist the urge to delete it.
load(filename)
location(x, y)
Please ignore as it has no effect with the project. it is only a representation of wish to practice testing at the onset of this project.