123456789101112131415161718192021222324252627282930313233343536 |
- package cards_test
- import (
- "log"
- "testing"
- "git.ali33.ru/fcg-xvii/cards"
- )
- func deckOffset(deck *cards.Deck) {
- log.Println(deck)
- deck.Shuffle()
- log.Println(deck)
- c, check := deck.PopRight()
- for check {
- log.Println(c, check)
- c, check = deck.PopRight()
- }
- deck.ResetOffset()
- deck.Shuffle()
- c, check = deck.PopLeft()
- for check {
- log.Println(c, check)
- c, check = deck.PopLeft()
- }
- }
- func TestDeck32(t *testing.T) {
- deck := cards.NewDeck36(2)
- deckOffset(deck)
- }
- func TestDeck54(t *testing.T) {
- deck := cards.NewDeck54(2)
- deckOffset(deck)
- }
|