Browse Source

Rename library from cards to joker

master
Trevor Slocum 2 years ago
parent
commit
4adab71872
  1. 4
      .builds/amd64_freebsd.yml
  2. 4
      .builds/amd64_linux_alpine.yml
  3. 3
      CHANGELOG
  4. 14
      README.md
  5. 2
      card.go
  6. 2
      card_face.go
  7. 2
      card_suit.go
  8. 2
      card_test.go
  9. 2
      cards.go
  10. 2
      cards_test.go
  11. 2
      deck.go
  12. 2
      deck_test.go
  13. 10
      doc.go
  14. 2
      go.mod

4
.builds/amd64_freebsd.yml

@ -1,13 +1,13 @@ @@ -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

4
.builds/amd64_linux_alpine.yml

@ -1,13 +1,13 @@ @@ -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

3
CHANGELOG

@ -1,3 +1,6 @@ @@ -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

@ -1,20 +1,20 @@ @@ -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).

2
card.go

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

2
card_face.go

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

2
card_suit.go

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

2
card_test.go

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

2
cards.go

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

2
cards_test.go

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

2
deck.go

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

2
deck_test.go

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

10
doc.go

@ -1,15 +1,15 @@ @@ -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 @@ -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

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

Loading…
Cancel
Save