Cribbage scoring library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
424 B

Package cribbage provides cribbage scoring.
To retrieve the cribbage value of a card:
cribbageValue := cribbage.Value(card)
To score a play, supply a discard pile:
pegPoints, pegResult := cribbage.Score(cribbage.Peg, discard, Card{})
To score a shown hand, supply a hand and a starter card:
handPoints, handResult := cribbage.Score(cribbage.ShownHand, hand, starter)
package cribbage