Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Deckster

Version (npm) Documentation Status Coverage Status Build Status Dependency Status

An open-source JavaScript library for creating card games.

The project is written in ECMAScript 6 and uses ESDoc for documentation.

Getting started

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);

About

An open-source JavaScript library for creating card games.

Resources

License

Packages

No packages published