Documentation ¶
Index ¶
- func MoveClaim(viewPos *game.ViewPos) (moveix int)
- func MoveDeck(viewPos *game.ViewPos) (moveix int)
- func MoveHand(viewPos *game.ViewPos) (moveix int)
- func MoveScoutReturn(viewPos *game.ViewPos) (moveix int)
- type Keep
- func (k *Keep) CalcIsHandGood(flagsAna map[int]*fa.Analysis, capNo int) bool
- func (k *Keep) DemandDump(flagsAna map[int]*fa.Analysis, flagix int) (troop card.Troop)
- func (k *Keep) DemandScoutReturn(no int, flagsAna map[int]*fa.Analysis) (troops []card.Troop)
- func (k *Keep) RequestFlagHandLowestStrenght() (cardMove card.Card)
- func (k *Keep) RequestLast(reqTroops []card.Troop) (troop card.Card)
- func (k *Keep) RequestLastHand(reqTroops []card.Troop) (troop card.Card)
- func (k *Keep) String() string
- type Moves
- func (moves Moves) FindCone(coneixs []int) (moveix int)
- func (moves Moves) FindDeck(deckPos pos.Card) (moveix int)
- func (moves Moves) FindDeserterMove(killCard card.Card) (dMove *game.Move, moveix int)
- func (moves Moves) FindDoubleFlags(guile card.Guile) (dbMoves []*game.Move, moveixs []int)
- func (moves Moves) FindHandFlag(flagix int, cardMove card.Card) (handFlagMove *game.Move, moveix int)
- func (moves Moves) FindScoutMove(deckPos pos.Card) (moveix int)
- func (moves Moves) FindScoutReturn(tacs []card.Card, troops []card.Troop) (moveix int)
- func (moves Moves) SearchPass() (moveix int)
- type Sim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MoveScoutReturn ¶
MoveScoutReturn make the scout return move. Strategi return redeploy, return leader if not usable. return exces tactic cards priority traitor,deserter,leader,fog,mud,8,123 return troops minimum not in keep.
Types ¶
type Keep ¶
type Keep struct { NewFlagMoveix int PriPlayFlagixs []int PriLiveFlagixs []int // contains filtered or unexported fields }
Keep keeps track of higher prioritized flags reserved cards.
func NewKeep ¶
func NewKeep( flagsAna map[int]*fa.Analysis, moves Moves, deckHandTroops *dht.Cache, botix int, ) (k *Keep)
NewKeep creates a keep.
func (*Keep) CalcIsHandGood ¶
CalcIsHandGood calculate if the hand is good. Calculate the number of good cards on the hand. Numbers of keep(flagHand) + good cards for new flags. More than two new flags must exist. Calculate suited connectors. Remove keep cards and loop over remaining n-2 and compare with cards to the right if connected add card to good set. Phalanx use troopsToStrxTroops Big bigger than 8.
func (*Keep) DemandDump ¶
DemandDump returns the least valued troop.
func (*Keep) DemandScoutReturn ¶
DemandScoutReturn returns maximum of two troop cards that can be returned without problem. Prioritised that least valued card first.
func (*Keep) RequestFlagHandLowestStrenght ¶
RequestFlagHandLowestStrenght returns a troop from the hand, that is not reserved if possibel.
func (*Keep) RequestLast ¶
RequestLast returns a troop that is not reserved by a flag formation if possible.
func (*Keep) RequestLastHand ¶
RequestLastHand returns a troop that is not reserved by a flag or a hand(empty flag move ) formation if possible.
type Moves ¶
Moves game moves.
func (Moves) FindDeserterMove ¶
FindDeserterMove finds a deserter move if not panics.
func (Moves) FindDoubleFlags ¶
FindDoubleFlags finds double flag moves redeploy and traitor.
func (Moves) FindHandFlag ¶
func (moves Moves) FindHandFlag(flagix int, cardMove card.Card) (handFlagMove *game.Move, moveix int)
FindHandFlag finds a hand to flag move, if not panics.
func (Moves) FindScoutMove ¶
FindScoutMove finds a scout move, if not panics.
func (Moves) FindScoutReturn ¶
FindScoutReturn finds a scout return moves, if not panics.
func (Moves) SearchPass ¶
SearchPass finds a pass move.
type Sim ¶
type Sim struct { Moves // contains filtered or unexported fields }
Sim the general information need to simulate a move.
func (*Sim) Move ¶
Move simulates a move and analyze the involved flags. a move may effect two flags a in-flag and a out-flag. The flags may be the same incase of a traitor move to the same flag, And one flag may be missing. Hand to flag move only in-flag. Desserter only out-flag. Traitor have both and the may be the same. Redeploy may have two or only a out-flag.