grid

package
v0.0.0-...-9c133fc Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid struct {
	StartRaw *api.StartRaw
	MapState *api.MapState
	Mutex    *sync.Mutex

	PathingSizeX int
	PathingSizeY int
}

func New

func New(startRaw *api.StartRaw, mapState *api.MapState) *Grid

func (*Grid) GetBitMapAddr

func (g *Grid) GetBitMapAddr(m *api.ImageData, ptr point.Pointer) (int, int)

func (*Grid) GetBitMapData

func (g *Grid) GetBitMapData(m *api.ImageData, p point.Pointer) int

func (*Grid) GetMapAddr

func (g *Grid) GetMapAddr(m *api.ImageData, ptr point.Pointer) int

func (*Grid) GetMapData

func (g *Grid) GetMapData(m *api.ImageData, p point.Pointer) int

func (*Grid) HeightAt

func (g *Grid) HeightAt(p point.Pointer) float64

func (*Grid) IsBuildable

func (g *Grid) IsBuildable(p point.Pointer) bool

func (*Grid) IsCreep

func (g *Grid) IsCreep(p point.Pointer) bool

func (*Grid) IsExplored

func (g *Grid) IsExplored(p point.Pointer) bool

func (*Grid) IsPathable

func (g *Grid) IsPathable(p point.Pointer) bool

func (*Grid) IsPathableFast

func (g *Grid) IsPathableFast(x, y int) bool

func (*Grid) IsVisible

func (g *Grid) IsVisible(ptr point.Pointer) bool

func (*Grid) Lock

func (g *Grid) Lock()

func (*Grid) Renew

func (g *Grid) Renew(startRaw *api.StartRaw, mapState *api.MapState)

func (*Grid) SetBuildable

func (g *Grid) SetBuildable(p point.Pointer, buildable bool)

func (*Grid) SetPathable

func (g *Grid) SetPathable(p point.Pointer, pathable bool)

func (*Grid) Unlock

func (g *Grid) Unlock()

Jump to

Keyboard shortcuts

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