🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@brightsole/bg-card-pile

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightsole/bg-card-pile

bg-card-pile

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

bg-card-pile

What is it?

tl;dr: a deck! a graveyard! an exile field! WHATEVER!

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?

tl;dr: `npm i @brightsole/bg-card-pile`
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 pile[card]
drawFromBottom(number)Draws x number of cards from the bottom of the pile[card]
drawRandomly(number)Draws x number of cards randomly from the pile[card]
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.


Buy Me A Coffee

Keywords

new

FAQs

Package last updated on 14 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts