algo

package
v0.0.0-...-4bcf823 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_MILLISECONDE = 5000
	ENERGY_MAX_ATTACK = 10
	MAX_CELLULES      = 4
	MAX_VALEUR        = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Algo

type Algo struct {
	Name       string
	ApiUrl     string
	ID         string
	Pc         structure.ProgrammeContainer
	InfosGrid  structure.GridInfos
	Psi        structure.ProgrammeStatusInfos
	StatusCode int
}

func NewAlgo

func NewAlgo(name string, apiUrl string) (algo *Algo, err error)

func NewAlgoBlueTeam

func NewAlgoBlueTeam(name string, apiUrl string) (algo *Algo, err error)

func (*Algo) ActiveCaptureFlag

func (a *Algo) ActiveCaptureFlag(Flag string) (ok bool, err error)

func (*Algo) ActiveShellCode

func (a *Algo) ActiveShellCode(targetID string, shellcode string) (ok bool, err error)

func (*Algo) CaptureCellData

func (a *Algo) CaptureCellData(celluleID int, index int) (ok bool, err error)

func (*Algo) CaptureCellEnergy

func (a *Algo) CaptureCellEnergy(celluleID int, index int) (ok bool, err error)

func (*Algo) CaptureTargetData

func (a *Algo) CaptureTargetData(celluleID int, targetID string) (ok bool, err error)

func (*Algo) CaptureTargetEnergy

func (a *Algo) CaptureTargetEnergy(celluleID int, targetID string) (ok bool, err error)

func (*Algo) CleanLog

func (a *Algo) CleanLog(celluleID int) (err error)

func (*Algo) CleanLogAll

func (a *Algo) CleanLogAll() (err error)

func (*Algo) Destroy

func (a *Algo) Destroy(celluleID int, targetID string, energy int) (ok bool, res []byte, err error)

func (*Algo) DestroyZone

func (a *Algo) DestroyZone(celluleID int, energy int) (ok bool, res []byte, err error)

func (*Algo) Equilibrium

func (a *Algo) Equilibrium() (ok bool, err error)

func (*Algo) EstimateMove

func (a *Algo) EstimateMove(secteurID string, zoneID string) (data structure.MoveEstimateData, err error)

func (*Algo) ExplorationStop

func (a *Algo) ExplorationStop() (ok bool, err error)

func (*Algo) Explore

func (a *Algo) Explore(celluleID int) (ok bool, res []byte, err error)

func (*Algo) GetInfosProgramme

func (a *Algo) GetInfosProgramme() (ok bool, err error)

func (*Algo) GetLog

func (a *Algo) GetLog(celluleID int) (celluleLogs map[int]structure.CelluleLog, err error)

func (*Algo) GetProgramme

func (a *Algo) GetProgramme() (ok bool, programmes []string)

func (*Algo) GetStatusGrid

func (a *Algo) GetStatusGrid() (err error)

func (*Algo) GetZoneinfos

func (a *Algo) GetZoneinfos() (ok bool, zoneInfos structure.ZoneInfos)

func (*Algo) InfosProgShellCode

func (a *Algo) InfosProgShellCode(targetID string, shellcode string) (ok bool, programmeInfos structure.ProgrammeInfos, err error)

func (*Algo) LoadProgramme

func (a *Algo) LoadProgramme(blue bool) (ok bool, err error)

func (*Algo) Move

func (a *Algo) Move(secteurID string, zoneID string) (ok bool, err error)

func (*Algo) NavigationStop

func (a *Algo) NavigationStop() (ok bool, err error)

func (*Algo) PrintInfo

func (a *Algo) PrintInfo(printGrid bool)

func (*Algo) PushFlag

func (a *Algo) PushFlag() (ok bool, err error)

func (*Algo) QuickMove

func (a *Algo) QuickMove(secteurID string, zoneID string) (ok bool, err error)

func (*Algo) Rebuild

func (a *Algo) Rebuild(celluleID int, targetID string, energy int) (ok bool, res []byte, err error)

func (*Algo) Scan

func (a *Algo) Scan() (ok bool, res []byte, err error)

func (*Algo) SearchEnergy

func (a *Algo) SearchEnergy(cellules []structure.CelluleInfos) (index int)

func (*Algo) SearchFlag

func (a *Algo) SearchFlag(cellules []structure.CelluleInfos) (flagFound bool)

func (*Algo) ShellCode

func (a *Algo) ShellCode() (ok bool, data []structure.ShellcodeData, err error)

func (*Algo) StopMove

func (a *Algo) StopMove() (ok bool, err error)

Jump to

Keyboard shortcuts

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