UNPKG

cardation

Version:

fundation of card games, card model

31 lines (30 loc) 820 B
import Card from '../card/Card'; import Collection from './Collection'; import Deck from './Deck'; import IShoe from './IShoe'; declare class Shoe extends Collection implements IShoe { private _decks_int; private _isExhausted; /** * @todo 在此處洗牌,是否有優勢? * @param decks */ constructor(decks?: Deck[]); clear(): void; sort(): void; pushCard(...card: Card[]): void; shuffle(): void; /** * Push cards of a deck into the shoe. * @param deck the deck to be pushed */ pushDeck(deck: Deck): void; /** * Deal cards from the end of the array. * @param {number} number how many cards to deal, default to 1 * @return Card[] */ deal(number?: number): Card[]; cut(number: number): void; } export default Shoe;