headsup

package
v0.0.0-...-f4aeec7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2016 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandProbMap

func HandProbMap() map[string]HandProb

HandProbMap returns a map of hand types (string of format of one of {89o, 89s, 99}. TODO: Add test coverage

Types

type HandProb

type HandProb struct {
	Win float64
	Tie float64
}

HandProb represents the probability of a hand winning

type Result

type Result struct {
	Win []float64
}

Result represents the probability breakdown of a hand unfolding

func NewResult

func NewResult(numHands int) *Result

NewResult creates a new Result instance for comparing numHands hands

func Prob

func Prob(hands ...hand.Hand) (*Result, error)

Prob given n (1 -> many) initial starting hands calculates the probabilities of the results by simulating every possible deal from the resultant deck. Likely faster to use a lookup table, this function can help generate one

func (*Result) String

func (r *Result) String() string

Jump to

Keyboard shortcuts

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