Skip to content

juliantomlin/cribbage-calculator

Repository files navigation

Cribbage calculator

Cribbage calculator will caculate the score of any cribbage hand.

How to use


npm install cribbage-calculator

  • function takes an array of cards as the argument
  • the first 4 cards in the array will be the hand, the 5th will be the knob
  • cards should be entered in for format 'value-suit',
  • a = ace, j = jack, q = queen, and k = king
  • h = hearts, d = dimonds, c = clubs, and s = spades

Example:

  const calculator = require('cribbage-calculator')

  console.log(calculator(['2h', '10c', '3s', 'qd', 'ah']))

  // returns 7

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages