team

package
v0.9.4-beta Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Balls represents the number of balls held by self.
	Balls = &Team{
		Name:      "balls",
		RGBA:      rgba.Purple,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		HoldingMax:   50,
		HoldingReset: true,

		Acceptance: .7,
		Delay:      time.Second,
	}

	First = &Team{
		Name:      "first",
		RGBA:      color.RGBA(rgba.LightPurple),
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Acceptance: .8,
		Delay:      time.Second / 4,
	}

	Game = &Team{
		Name:      "game",
		RGBA:      rgba.White,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Delay:      time.Second * 5,
		Acceptance: .8,
	}

	// Orange represents the standard Team for the Orange side.
	Orange = &Team{
		Name:      "orange",
		RGBA:      rgba.Orange,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Acceptance: .8,
		Delay:      time.Second,
	}

	// Purple represents the standard Team for the Purple side.
	Purple = &Team{
		Name:      "purple",
		RGBA:      rgba.Purple,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Acceptance: .8,
		Delay:      time.Second,
	}

	// Self represents a wrapper Team for the Purple side.
	Self = &Team{
		Name:      "self",
		RGBA:      rgba.Yellow,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Acceptance: .75,
		Delay:      time.Second / 4,
	}

	Time = &Team{
		Name:      "time",
		RGBA:      rgba.White,
		Duplicate: duplicate.New(-1, gocv.NewMat(), gocv.NewMat()),

		Acceptance: .8,
		Delay:      time.Second,
	}

	Teams = []*Team{Orange, Purple, Self, Balls, Game, Time, First}
)

Functions

func Clear

func Clear()

func Delay

func Delay(team string) time.Duration

Types

type Team

type Team struct {
	Name                 string `json:"name"`
	Alias                string `json:"-"`
	color.RGBA           `json:"-"`
	*duplicate.Duplicate `json:"-"`

	Killed       time.Time
	Holding      int  `json:"-"`
	HoldingMax   int  `json:"-"`
	HoldingReset bool `json:"-"`

	Acceptance float32
	Delay      time.Duration
}

Team represents a team side in Pokémon Unite.

func (Team) Comparable

func (t Team) Comparable(mat gocv.Mat) gocv.Mat

Comparable returns a smaller ROI to help increase duplication accuracy assurance.

func (Team) Crop

func (t Team) Crop(p image.Point) image.Rectangle

Crop returns the dimensions for a cropped ROI for use with granular template matching.

func (Team) MarshalZerologObject

func (t Team) MarshalZerologObject(e *zerolog.Event)

Jump to

Keyboard shortcuts

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