calc

package
v0.0.0-...-48ab5c1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BurnCardsCount = 3
View Source
const CardsUsedInTexasHoldem = 7
View Source
const CommunityCardsCount = 5
View Source
const HoleCardsCount = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type HandOddsConfig

type HandOddsConfig struct {
	Hands           [][]cards.Card
	Board           []cards.Card
	IterationsCount int
	GameConfig      game.Config
}

type HandOddsIteration

type HandOddsIteration struct {
	Combinations []cards.Combination
	Board        []cards.Card
}

func (HandOddsIteration) IsTie

func (r HandOddsIteration) IsTie() (bool, error)

func (HandOddsIteration) StrongestCombination

func (r HandOddsIteration) StrongestCombination() (*cards.Combination, error)

func (HandOddsIteration) Winner

func (r HandOddsIteration) Winner() (int, error)

type HandOddsResult

type HandOddsResult struct {
	Config     HandOddsConfig
	Iterations []HandOddsIteration
}

func HandOdds

func HandOdds(config HandOddsConfig) (*HandOddsResult, error)

func (HandOddsResult) AllPlayerWins

func (r HandOddsResult) AllPlayerWins() ([]int, error)

func (HandOddsResult) NumberOfPlayers

func (r HandOddsResult) NumberOfPlayers() int

func (HandOddsResult) PlayerCombinations

func (r HandOddsResult) PlayerCombinations(index int) ([]cards.Combination, error)

func (HandOddsResult) PlayerHand

func (r HandOddsResult) PlayerHand(index int) ([]cards.Card, error)

func (HandOddsResult) PlayerWins

func (r HandOddsResult) PlayerWins(index int) (int, error)

func (HandOddsResult) TiePercentage

func (r HandOddsResult) TiePercentage() (float32, error)

func (HandOddsResult) Ties

func (r HandOddsResult) Ties() (int, error)

func (HandOddsResult) WinRates

func (r HandOddsResult) WinRates() ([]float32, error)

func (HandOddsResult) WinningPlayer

func (r HandOddsResult) WinningPlayer() (int, error)

Jump to

Keyboard shortcuts

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