grid

package
v0.0.0-...-ca45fb7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grid

type Grid[T any] map[[2]int]*T

Deprecated. Use space.Grid instead.

func (Grid[T]) Adjacent

func (g Grid[T]) Adjacent(x, y int) []*T

func (Grid[T]) Diagonal

func (g Grid[T]) Diagonal(x, y int) []*T

func (Grid[T]) Find

func (g Grid[T]) Find(f func(T) bool) *T

func (Grid[T]) Get

func (g Grid[T]) Get(x, y int) *T

func (Grid[T]) InRange

func (g Grid[T]) InRange(x1, y1, x2, y2 int) (s []*T)

func (Grid[T]) Set

func (g Grid[T]) Set(x, y int, cell T)

func (Grid[T]) Surrounding

func (g Grid[T]) Surrounding(x, y int) []*T

func (Grid[T]) XRange

func (g Grid[T]) XRange() (x1, x2 int)

func (Grid[T]) YRange

func (g Grid[T]) YRange() (y1, y2 int)

Jump to

Keyboard shortcuts

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