Esempio n. 1
0
func holeCardsPopMulti(d *hand.Deck, v CardVisibility, n int) []*HoleCard {
	cards := d.PopMulti(n)
	holeCards := []*HoleCard{}
	for _, c := range cards {
		holeCards = append(holeCards, newHoleCard(c, v))
	}
	return holeCards
}
Esempio n. 2
0
File: game.go Progetto: notnil/joker
func (g *holdemGame) BoardCards(deck *hand.Deck, r round) []*hand.Card {
	switch r {
	case flop:
		return deck.PopMulti(3)
	case turn:
		return deck.PopMulti(1)
	case river:
		return deck.PopMulti(1)
	}
	return []*hand.Card{}
}