preferans deck of cards
This project is maintained by prefko
preferans deck of cards
yarn add preferans-deck-js
const preferansDeckJs = require("preferans-deck-js");
const Deck = preferansDeckJs.default;
const Card = preferansDeckJs.Card;
let card = new Card('7');
console.log(card.unicode);
// K♠
let deck = new Deck();
let deal = deck.deal;
console.log("Hand 1:", deal.hand1.unicode);
console.log("Hand 2:", deal.hand2.unicode);
console.log("Hand 3:", deal.hand3.unicode);
console.log("Talon:", deal.talon.talon1.unicode + deal.talon.talon2.unicode);
// Hand 1: 7♠8♠9♠X♠J♠8♥9♥X♥J♥Q♥
// Hand 2: Q♠K♠A♠7♦8♦K♥A♥7♣8♣9♣
// Hand 3: 9♦X♦J♦Q♦K♦X♣J♣Q♣K♣A♣
// Talon: A♦7♥
Mostly from Wikipedia.