Skip to content

minhajuddinkhan/pattay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

34e7700 · Oct 28, 2019

History

5 Commits
Oct 28, 2019
Oct 20, 2019
Oct 20, 2019
Oct 20, 2019
Oct 20, 2019
Oct 22, 2019
Oct 22, 2019
Oct 21, 2019
Oct 20, 2019

Repository files navigation

Pattay alt text

Integrable deck of cards, and 4 player ring

Ring

//Ring ring of players in a game of cards
type Ring interface {
	
        // Players returns
	Players() []RingPlayer
	
        //Next returns player to play next
	Next() (RingPlayer, error)

	//SetCurrentPlayer sets current player in the ring
	SetCurrentPlayer(player RingPlayer)

	//GetCurrentPlayer gets current player in the ring
	GetCurrentPlayer() (player RingPlayer)

	//HasCurrentPlayer return whether current player is set for the ring
	HasCurrentPlayer() bool
}

Deck

//Deck Deck of cards
type Deck interface {
	
        //Cards returns all cards
	CardsInDeck() []Card

	//IsCardPresent  Checks if a given card is present in deck
	IsCardPresent(c Card) bool

	//DrawCard draws a card from the deck
	DrawCard(i int) (Card, error)

	//DrawCards draws multiple cards from the deck
	DrawCards(m, n int) ([]Card, error)

	//PutCard puts card in th deck
	PutCard(c Card) error

	//PutCard puts multiple card in th deck
	PutCards(cards []Card) error

	//Shuffle shuffles the deck n times
	Shuffle(n int) error
}

About

Integrable deck of cards, and 4 player ring

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages