Rename library from cards to joker
This commit is contained in:
parent
b0983c2e47
commit
4adab71872
|
@ -1,13 +1,13 @@
|
|||
arch: amd64
|
||||
environment:
|
||||
PROJECT_NAME: 'cards'
|
||||
PROJECT_NAME: 'joker'
|
||||
CGO_ENABLED: '1'
|
||||
GO111MODULE: 'on'
|
||||
image: freebsd/latest
|
||||
packages:
|
||||
- go
|
||||
sources:
|
||||
- https://git.sr.ht/~tslocum/cards
|
||||
- https://git.sr.ht/~tslocum/joker
|
||||
tasks:
|
||||
- test: |
|
||||
cd $PROJECT_NAME
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
arch: x86_64
|
||||
environment:
|
||||
PROJECT_NAME: 'cards'
|
||||
PROJECT_NAME: 'joker'
|
||||
CGO_ENABLED: '1'
|
||||
GO111MODULE: 'on'
|
||||
image: alpine/edge
|
||||
packages:
|
||||
- go
|
||||
sources:
|
||||
- https://git.sr.ht/~tslocum/cards
|
||||
- https://git.sr.ht/~tslocum/joker
|
||||
tasks:
|
||||
- test: |
|
||||
cd $PROJECT_NAME
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
0.1.2:
|
||||
- Rename library from cards to joker
|
||||
|
||||
0.1.1:
|
||||
- Add Low, High, Copy, Sort, Reverse, Contains, Count, and Equal methods to Cards
|
||||
- Add RNG seed parameter to NewDeck
|
||||
|
|
14
README.md
14
README.md
|
@ -1,20 +1,20 @@
|
|||
# cards
|
||||
[![GoDoc](https://godoc.org/git.sr.ht/~tslocum/cards?status.svg)](https://godoc.org/git.sr.ht/~tslocum/cards)
|
||||
[![builds.sr.ht status](https://builds.sr.ht/~tslocum/cards.svg)](https://builds.sr.ht/~tslocum/cards)
|
||||
# joker
|
||||
[![GoDoc](https://godoc.org/git.sr.ht/~tslocum/joker?status.svg)](https://godoc.org/git.sr.ht/~tslocum/joker)
|
||||
[![builds.sr.ht status](https://builds.sr.ht/~tslocum/joker.svg)](https://builds.sr.ht/~tslocum/joker)
|
||||
[![Donate](https://img.shields.io/liberapay/receives/rocketnine.space.svg?logo=liberapay)](https://liberapay.com/rocketnine.space)
|
||||
|
||||
Playing card library
|
||||
|
||||
## Extensions
|
||||
|
||||
The following libraries extend cards:
|
||||
The following libraries extend joker:
|
||||
|
||||
- [cards-cribbage](https://git.sr.ht/~tslocum/cards-cribbage)
|
||||
- [joker-cribbage](https://git.sr.ht/~tslocum/joker-cribbage)
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on [godoc](https://godoc.org/git.sr.ht/~tslocum/cards).
|
||||
Documentation is available on [godoc](https://godoc.org/git.sr.ht/~tslocum/joker).
|
||||
|
||||
## Support
|
||||
|
||||
Please share issues/suggestions [here](https://todo.sr.ht/~tslocum/cards).
|
||||
Please share issues/suggestions [here](https://todo.sr.ht/~tslocum/joker).
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cards
|
||||
package joker
|
||||
|
||||
// CardFace defines a card face.
|
||||
type CardFace int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cards
|
||||
package joker
|
||||
|
||||
// CardSuit defines a card suit.
|
||||
type CardSuit int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cards
|
||||
package joker
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cards
|
||||
package joker
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package cards
|
||||
package joker
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
|
10
doc.go
10
doc.go
|
@ -1,15 +1,15 @@
|
|||
/*
|
||||
Package cards provides playing cards.
|
||||
Package joker provides playing cards.
|
||||
|
||||
Cards
|
||||
|
||||
To initialize a card:
|
||||
|
||||
card := Card{FaceAce, SuitSpades}
|
||||
card := joker.Card{FaceAce, SuitSpades}
|
||||
|
||||
To sort a set of cards:
|
||||
|
||||
hand := Cards{
|
||||
hand := joker.Cards{
|
||||
Card{FaceAce, SuitSpades},
|
||||
Card{Face3, SuitSpades},
|
||||
Card{Face2, SuitSpades}
|
||||
|
@ -22,6 +22,6 @@ To initialize a deck, call NewDeck with a seed for the random number generator
|
|||
used when shuffling. A seed value of zero will be replaced with the
|
||||
current unix time in nanoseconds.
|
||||
|
||||
deck := NewDeck(StandardCards, 0)
|
||||
deck := joker.NewDeck(StandardCards, 0)
|
||||
*/
|
||||
package cards
|
||||
package joker
|
||||
|
|
Loading…
Reference in New Issue