Coding exercise exhibiting a card shuffler with sorting and filtering functionality.
Design an application that models a normal deck of 52 cards
- Implement a method to shuffle the deck that does not use native random() function.
- Get all cards with the same suit from a shuffled deck.
- Order a shuffled deck in the following suit and card number (Diamonds A-K, Clubs A-K, Hearts A-K, Spades A-K).
- Implement at your own sort method.
- Write unit tests to for each method.
The following is software is required for installation:
- Node.js (used v10.7.0)
- npm (used v6.2.0)
- Clone the project from Github:
SSH:
git clone git@github.com:SWeggboy/cards.git
HTTPS:
git clone https://github.com/SWeggboy/cards.git
- Install dependencies:
npm install
Run the following on the command line:
npm start
All test files are located under __tests__
. Run the following command to execute tests:
npm test