combi

package
v0.0.0-...-0992052 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Combinations3, Combinations4 []*Combination

Functions

func LastFormationRank

func LastFormationRank(formation cards.Formation, formationSize int) (rank int)

func TroopsToValuexTroopixs

func TroopsToValuexTroopixs(troopixs []int) (valuexTroopixs map[int][]int)

troopsToValues colapses troopixs on values.

Types

type Analysis

type Analysis struct {
	Comb        *Combination
	Valid       uint64
	All         uint64
	HandCardixs []int
	Prop        float64
}

Analysis the result of a combination analysis.

func Ana

func Ana(comb *Combination, flagCards []int, handCards []int, drawSet map[int]bool,
	drawNo int, mud bool) (ana *Analysis)

Ana analyze a combination.

func (*Analysis) String

func (ana *Analysis) String() string

type Combination

type Combination struct {
	Rank      int
	Formation cards.Formation
	Strength  int
	//Troops is all the cards that can be used to create the formation.
	Troops map[int][]int
}

Combination a battleline formation and strength

func Combinations

func Combinations(size int) []*Combination

func CombinationsMud

func CombinationsMud(isMud bool) []*Combination

func (*Combination) String

func (c *Combination) String() string

Jump to

Keyboard shortcuts

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