https://github.com/kripod/deckster
An open-source JavaScript library for creating card games.
https://github.com/kripod/deckster
Last synced: about 1 year ago
JSON representation
An open-source JavaScript library for creating card games.
- Host: GitHub
- URL: https://github.com/kripod/deckster
- Owner: kripod
- License: mit
- Created: 2015-11-07T09:06:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-12T18:10:19.000Z (over 10 years ago)
- Last Synced: 2025-02-05T19:09:38.417Z (over 1 year ago)
- Language: JavaScript
- Size: 166 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deckster
[](https://npmjs.com/package/deckster)
[](https://doc.esdoc.org/github.com/DecksterJS/deckster)
[](https://coveralls.io/github/DecksterJS/deckster)
[](https://travis-ci.org/DecksterJS/deckster)
[](https://versioneye.com/user/projects/563dcd194d415e001e0001bd)
An open-source JavaScript library for creating card games.
The project is written in ECMAScript 6 and uses [ESDoc][] for documentation.
[ESDoc]: https://esdoc.org
## Getting started
``` js
import Deckster from 'deckster';
import Standard52CardDeck from 'deckster-deck-standard-52card';
// Initialize the array of players who can participate in a game's rounds
let players = [
new Deckster.Player(0),
new Deckster.Player(1),
new Deckster.Player(2),
new Deckster.Player(3)
];
// Initialize new instance of a standard playing card deck
let deck = new Standard52CardDeck();
// Creates a new game instance which has a set of cards available to play with
let game = new Deckster.Game(deck);
// Initiates a new round of the game, in which the deck gets shuffled, and
// cards can be dealt from it
let round = game.createRound(players);
```