part2

package
v0.0.0-...-3c753f8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareCard

func CompareCard(a, b byte) bool

func Greater

func Greater(a, b Hand) bool

func Solve

func Solve(input string) int

Types

type CardType

type CardType int64
const (
	HighCard CardType = iota
	OnePair
	TwoPair
	ThreeOfAKind
	FullHouse
	FourOfAKind
	FiveOfAKind
)

type Hand

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

func (Hand) Frequency

func (h Hand) Frequency() map[byte]int

func (Hand) FrequencySortedByValue

func (h Hand) FrequencySortedByValue() []kv

func (Hand) IsFiveOfAKind

func (h Hand) IsFiveOfAKind() bool

func (Hand) IsFourOfAKind

func (h Hand) IsFourOfAKind() bool

func (Hand) IsFullHouse

func (h Hand) IsFullHouse() bool

func (Hand) IsHighCard

func (h Hand) IsHighCard() bool

func (Hand) IsOnePair

func (h Hand) IsOnePair() bool

func (Hand) IsThreeOfAKind

func (h Hand) IsThreeOfAKind() bool

func (Hand) IsTwoPair

func (h Hand) IsTwoPair() bool

func (Hand) Type

func (h Hand) Type() CardType

Jump to

Keyboard shortcuts

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