0.1.0 • Published 4 years ago

@brightsole/bg-card-pile v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

bg-card-pile

What is it?

It's just a big pile of cards, that might be anything.

It has a bunch of helpful ways to access these cards, and interact with the deck in a variety of human ways.

How to use it?

MethodDescriptionreturn
shuffle()shuffle card order internallyvoid
cardsRemainingCount()Get the count of the cards left in the decknumber
draw(number)Draws x number of cards from the top of the pilecard
drawFromBottom(number)Draws x number of cards from the bottom of the pilecard
drawRandomly(number)Draws x number of cards randomly from the pilecard
returnAndShuffle(card)Returns cards to the deck and shuffles the order *void
returnToTop(card)Returns cards onto the top of the deck in order *void
returnToBottom(card)Returns cards onto the bottom of the deck in order *void
  • All return methods try to reset the card if the card is an object with a reset method

TODO:

nothing! It's a functional deck/graveyard/whatever pile of cards. Methods can be added as needed, but this will handle the next 3 games I have planned.