/cards

Application to allow shuffling and sorting of a deck of cards

Primary LanguageJavaScript

Deck of cards

Acceptance criteria

  • Can I shuffle the deck of cards (yes using A key)
  • Can I draw any given number of cards from the deck, with the cards being removed from the original deck? (yes using the mouse to select each card)
  • Can I draw any given number of cards from the deck and then sort the drawn cards, with the cards being removed from the original deck? (yes the cards will be sorted after every new card drawn)
  • Sorted cards are sorted by suit: Clubs, Spades, Hearts, Diamonds; then by value: Ace is high. (yes using B key, drawn cards are also automatically sorted for convenience)

Project dependencies

This project was built using the following:

  • Babel to transpile code to ES2015
  • Webpack to bundle JS, SASS
  • Webpack dev server for local server
  • Mocha and Chai for unit tests
  • StandardJS for code linting
  • PixiJS for canvas rendering

Build instructions

To install the build dependencies

npm install

Running the project in development mode - by default use http://localhost:8080

npm start

Running unit tests

npm test