1.5.2 • Published 4 years ago

typedeck v1.5.2

Weekly downloads
102
License
MIT
Repository
github
Last release
4 years ago

TypeDeck

Build Status NPM version codecov dependencies Status devDependencies Status

A TypeScript library for playing cards.

Getting Started

Features

typedeck gives you types and classes to help jumpstart your card-based game.

  • Card
    • Simple card classes (PlayingCard/JokerCard)
  • Chip
    • Provided Chip classes and standard values
      • Values can be overridden, and custom Chip classes
  • Declarative Types
    • CardName: [Ace, Two, Three, ...]
    • Suit: [Clubs, Spades, Diamonds, Hearts]
  • Card collections
    • Classes that represent multiple cards as a logical item.
      • Hand - cards that belong to a player
      • CardPile - cards that are frequently drawn from or added to
      • Deck - extension of CardPile with additional game-time helpers
  • Services
    • Shuffle
      • Shuffle any ICard implementation
    • Poker Hand Scoring
      • Texas Hold Em Hand Detection
      • Winner scoring/determination
    • Chip management
      • Taking specific values
      • Creating chips from value
      • Breaking chips to get specific value
  • And so much more ... see the documentation for a full list.

Customization

Most features support parameters that implement either an interface or a base class. You can create your own type of Card that implements ICard or a Chip with special chip color values which extends Chip base class.

Credits

1.5.2

4 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago