grid

package
v0.0.0-...-2577a71 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 0 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] [][]T

func NewGridSize

func NewGridSize[T any](cols, rows int) Grid[T]

func (Grid[T]) Get

func (g Grid[T]) Get(i Index) (T, bool)

func (Grid[T]) Set

func (g Grid[T]) Set(i Index, t T)

type Index

type Index struct{ X, Y int }

func Adjacent

func Adjacent(i Index) []Index

func (Index) Add

func (i Index) Add(i2 Index) Index

func (Index) Sub

func (i Index) Sub(i2 Index) Index

Jump to

Keyboard shortcuts

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