here are the methods inside this Class:
shuffleCards
: this will shuffle the cards into random order.import { StandardDeck, CardDeck } from 'card-games-utils'
let cardDeck = StandardDeck.getStandardDeck()
console.log(CardDeck.shuffleCards(cardDeck)) //logs the array of card in random order
distributeCards
: this will Distribute the specified number of cards per player to given number of players.
number of players
and how many cards you want per player
. it has has 1 optional parameter that will decide how the cards should be distributed among the playerimport { StandardDeck, CardDeck } from 'card-games-utils'
let cardDeck = StandardDeck.getStandardDeck()
//logs the array of distributed cards for each player
console.log(CardDeck.distributeCards(cardDeck, 3, 3, true)[0])