...

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

Documentation: gitlab.com/tslocum/joker

     1  /*
     2  Package joker provides playing cards.
     3  
     4  Cards
     5  
     6  To initialize a card:
     7  
     8      card := joker.Card{FaceAce, SuitSpades}
     9  
    10  To sort a set of cards:
    11  
    12      hand := joker.Cards{
    13        Card{FaceAce, SuitSpades},
    14        Card{Face3, SuitSpades},
    15        Card{Face2, SuitSpades}
    16      }
    17      sort.Sort(hand)
    18  
    19  Deck
    20  
    21  To initialize a deck, call NewDeck with a seed for the random number generator
    22  used when shuffling. A seed value of zero will be replaced with the
    23  current unix time in nanoseconds.
    24  
    25      deck := joker.NewDeck(StandardCards, 0)
    26  */
    27  package joker
    28  

View as plain text