blackjack

package
v0.0.0-...-2498082 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackJack

type BlackJack struct {
	// contains filtered or unexported fields
}

func NewGame

func NewGame() *BlackJack

func (*BlackJack) Bet

func (b *BlackJack) Bet(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Double

func (b *BlackJack) Double(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Finish

func (*BlackJack) Hit

func (b *BlackJack) Hit(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Join

func (b *BlackJack) Join(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Leave

func (b *BlackJack) Leave(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) PeekAtDealer

func (b *BlackJack) PeekAtDealer() string

func (*BlackJack) Scores

func (b *BlackJack) Scores(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Start

func (b *BlackJack) Start(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Stay

func (b *BlackJack) Stay(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

func (*BlackJack) Total

func (b *BlackJack) Total(args []string, s *discordgo.Session, m *discordgo.MessageCreate)

type Card

type Card interface {
	Value() string
	Suit() string
}

type Datastore

type Datastore interface {
	GlobalTopTen() []Player
	GuildTopTen(string) []Player
}

func BuildDatastore

func BuildDatastore() Datastore

type Deck

type Deck interface {
	Shuffle()
	Insert(Card)
	Draw() Card
	Peek() Card
	Next() Card
	Size() int
	Total() int
	String() string
}

func NewDeck

func NewDeck() Deck

type FrenchCard

type FrenchCard struct {
	// contains filtered or unexported fields
}

func NewCard

func NewCard(v, s string) *FrenchCard

FrenchCard is a struct for cards

func (*FrenchCard) Suit

func (c *FrenchCard) Suit() string

func (*FrenchCard) Value

func (c *FrenchCard) Value() string

type FrenchDeck

type FrenchDeck struct {
	// contains filtered or unexported fields
}

func NewHand

func NewHand() *FrenchDeck

func (*FrenchDeck) Draw

func (self *FrenchDeck) Draw() Card

func (*FrenchDeck) Insert

func (self *FrenchDeck) Insert(card Card)

func (*FrenchDeck) Next

func (self *FrenchDeck) Next() Card

func (*FrenchDeck) Peek

func (self *FrenchDeck) Peek() Card

func (*FrenchDeck) Shuffle

func (self *FrenchDeck) Shuffle()

func (*FrenchDeck) Size

func (self *FrenchDeck) Size() int

func (*FrenchDeck) String

func (self *FrenchDeck) String() string

func (*FrenchDeck) Total

func (self *FrenchDeck) Total() int

type Player

type Player struct {
	ID   string
	Name string

	Bank int
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(id string) *Player

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL