...

Source file src/gitlab.com/tslocum/joker-cribbage/doc.go

Documentation: gitlab.com/tslocum/joker-cribbage

     1  /*
     2  Package cribbage provides cribbage scoring.
     3  
     4  Cards
     5  
     6  To retrieve the cribbage value of a card:
     7  
     8      cribbageValue := cribbage.Value(card)
     9  
    10  Scoring
    11  
    12  To score a play, supply a discard pile:
    13  
    14      pegPoints, pegResult := cribbage.Score(cribbage.Peg, discard, Card{})
    15  
    16  To score a shown hand, supply a hand and a starter card:
    17  
    18      handPoints, handResult := cribbage.Score(cribbage.ShownHand, hand, starter)
    19  */
    20  package cribbage
    21  

View as plain text