Browse Source

Rename library from cards to joker

master
Trevor Slocum 1 year ago
parent
commit
4adab71872
14 changed files with 28 additions and 25 deletions
  1. +2
    -2
      .builds/amd64_freebsd.yml
  2. +2
    -2
      .builds/amd64_linux_alpine.yml
  3. +3
    -0
      CHANGELOG
  4. +7
    -7
      README.md
  5. +1
    -1
      card.go
  6. +1
    -1
      card_face.go
  7. +1
    -1
      card_suit.go
  8. +1
    -1
      card_test.go
  9. +1
    -1
      cards.go
  10. +1
    -1
      cards_test.go
  11. +1
    -1
      deck.go
  12. +1
    -1
      deck_test.go
  13. +5
    -5
      doc.go
  14. +1
    -1
      go.mod

+ 2
- 2
.builds/amd64_freebsd.yml 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


+ 2
- 2
.builds/amd64_linux_alpine.yml 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


+ 3
- 0
CHANGELOG 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


+ 7
- 7
README.md 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).

+ 1
- 1
card.go View File

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


+ 1
- 1
card_face.go View File

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


+ 1
- 1
card_suit.go View File

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


+ 1
- 1
card_test.go View File

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


+ 1
- 1
cards.go View File

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


+ 1
- 1
cards_test.go View File

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


+ 1
- 1
deck.go View File

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


+ 1
- 1
deck_test.go View File

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


+ 5
- 5
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

+ 1
- 1
go.mod View File

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

Loading…
Cancel
Save