Rename library from cards to joker

This commit is contained in:
Trevor Slocum 2020-01-15 07:56:59 -08:00
parent b0983c2e47
commit 4adab71872
14 changed files with 28 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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).

View File

@ -1,4 +1,4 @@
package cards
package joker
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package cards
package joker
// CardFace defines a card face.
type CardFace int

View File

@ -1,4 +1,4 @@
package cards
package joker
// CardSuit defines a card suit.
type CardSuit int

View File

@ -1,4 +1,4 @@
package cards
package joker
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package cards
package joker
import "sort"

View File

@ -1,4 +1,4 @@
package cards
package joker
import (
"reflect"

View File

@ -1,4 +1,4 @@
package cards
package joker
import (
"math/rand"

View File

@ -1,4 +1,4 @@
package cards
package joker
import (
"testing"

10
doc.go
View File

@ -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

2
go.mod
View File

@ -1,3 +1,3 @@
module git.sr.ht/~tslocum/cards
module git.sr.ht/~tslocum/joker
go 1.13