Home Reference Source Repository
import Deck from 'deckster/src/models/deck.js'
public class | source

Deck

Represents a set of cards which holds all the available card types of a deck.

Constructor Summary

Public Constructor
public

constructor(cardSuitTypes: number, cardRankTypes: number)

Creates a new card deck with a specific amount of cards available.

Member Summary

Public Members
public get

Gets the amount of different card rank types in the deck.

public get

Gets the amount of different card suit types in the deck.

public get

Gets the amount of all the available card types in the deck.

Public Constructors

public constructor(cardSuitTypes: number, cardRankTypes: number) source

Creates a new card deck with a specific amount of cards available.

Params:

NameTypeAttributeDescription
cardSuitTypes number

The amount of different card suit types in the deck.

cardRankTypes number

The amount of different card rank types in the deck.

Public Members

public get cardRankTypes: number source

Gets the amount of different card rank types in the deck.

public get cardSuitTypes: number source

Gets the amount of different card suit types in the deck.

public get cardTypes: number source

Gets the amount of all the available card types in the deck.