Fork me on GitHub

CardForest seeds

The RIDER deck

The Rider-Waite tarot deck is one of the most popular tarot decks in use today in the english-speaking world

The Cards

AW 2W 3W 4W 5W 6W 7W 8W 9W TW PW NW QW KW AP 2P 3P 4P 5P 6P 7P 8P 9P TP PP NP QP KP AC 2C 3C 4C 5C 6C 7C 8C 9C TC PC NC QC KC AS 2S 3S 4S 5S 6S 7S 8S 9S TS PS NS QS KS 0 I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII XVIII XIX XX XXI

Formal Specification edit on github

The cards in a tarot deck are divided into 22 major arcana cards and 56 minor arcana cards.

Arcana = 
  MAJOR: {}
  MINOR: {}

Each minor arcana card has a rank

Rank =
  ACE:
    $id: 'A'
  TWO:
    $id: '2'
  THREE:
    $id: '3'
  FOUR:
    $id: '4'
  FIVE:
    $id: '5'
  SIX:
    $id: '6'
  SEVEN:
    $id: '7'
  EIGHT:
    $id: '8'
  NINE:
    $id: '9'
  TEN:
    $id: 'T'
  PAGE:
    $id: 'P'
  KNIGHT:
    $id: 'N' # sometimes represented as 'Kn' or 'Kt'
  QUEEN:
    $id: 'Q'
  KING:
    $id: 'K'

and a suit

Suit =
  WANDS:
    $id: 'W'
  PENTACLES:
    $id: 'P'
  CUPS:
    $id: 'C'
  SWORDS:
    $id: 'S'

that define it.

Card = {}
for suitName, suit of Suit
  for rankName, rank of Rank
    $id = "#{rank.$id}#{suit.$id}"
    Card["#{rankName}_#{suitName}"] = {$id, rank, suit, arcana: Arcana.MINOR}

The major arcana cards serve as a permanent trump and they do not have a normal suit or rank.

major =
  FOOL:
    $id: '0' # sometimes represented as 'XXI' or 'XXII'
  MAGICIAN:
    $id: 'I'
  HIGH_PRIESTESS:
    $id: 'II'
  EMPRESS:
    $id: 'III'
  EMPEROR:
    $id: 'IV'
  HIEROPHANT:
    $id: 'V'
  LOVERS:
    $id: 'VI'
  CHARIOT:
    $id: 'VII'
  STRENGTH:
    $id: 'VIII'
  HERMIT:
    $id: 'IX'
  WHEEL_OF_FORTUNE:
    $id: 'X'
  JUSTICE:
    $id: 'XI'
  HANGED_MAN:
    $id: 'XII'
  DEATH:
    $id: 'XIII'
  TEMPERANCE:
    $id: 'XIV'
  DEVIL:
    $id: 'XV'
  TOWER:
    $id: 'XVI'
  STAR:
    $id: 'XVII'
  MOON:
    $id: 'XVIII'
  SUN:
    $id: 'XIX'
  JUDGEMENT:
    $id: 'XX'
  WORLD:
    $id: 'XXI'
for cardName, card of major
  Card[cardName] = card
  card.arcana = Arcana.MAJOR

PUBLIC API

module.exports = {Arcana, Rank, Suit, Card}
h


Some rights reserved - read the license