Versions in this module Expand all Collapse all v1 v1.3.0 Dec 17, 2022 Changes in this version type Grid + func NewGridOf(width, height int16) *Grid[T] + func (m *Grid[T]) MaskAt(x, y int16, tile, mask Value) type Tile + func (c Tile[T]) Add(v T) + func (c Tile[T]) Count() (count int) + func (c Tile[T]) Del(v T) + func (c Tile[T]) Mask(tile, mask Value) Value + func (c Tile[T]) Merge(merge func(Value) Value) Value + func (c Tile[T]) Range(fn func(T) error) error + func (c Tile[T]) Value() Value + func (c Tile[T]) Write(tile Value) type Update + Add T + Del T + New Value + Old Value + type Value = uint32 v1.2.3 Dec 3, 2022 Changes in this version type Grid + func (m *Grid) NotifyAt(x, y int16) v1.2.2 Dec 3, 2022 Changes in this version type Grid + func ReadFile(filename string) (grid *Grid, err error) + func (m *Grid) WriteFile(filename string) error v1.2.1 Jun 19, 2022 v1.2.0 Dec 29, 2021 Changes in this version + type Direction byte + const East + const North + const NorthEast + const NorthWest + const South + const SouthEast + const SouthWest + const West + func (v Direction) String() string type Point + func (p Point) Move(direction Direction) Point + func (p Point) MoveBy(direction Direction, n int16) Point v1.1.0 Dec 12, 2021 v1.0.0 Aug 31, 2020 Changes in this version + type Grid struct + Size Point + func NewGrid(width, height int16) *Grid + func ReadFrom(rdr io.Reader) (grid *Grid, err error) + func (m *Grid) Around(from Point, distance uint32, costOf costFn, fn Iterator) + func (m *Grid) At(x, y int16) (Tile, bool) + func (m *Grid) Each(fn Iterator) + func (m *Grid) MergeAt(x, y int16, tile, mask Tile) + func (m *Grid) Neighbors(x, y int16, fn Iterator) + func (m *Grid) Path(from, to Point, costOf costFn) ([]Point, int, bool) + func (m *Grid) View(rect Rect, fn Iterator) *View + func (m *Grid) Within(nw, se Point, fn Iterator) + func (m *Grid) WriteAt(x, y int16, tile Tile) + func (m *Grid) WriteTo(dst io.Writer) (n int64, err error) + type Iterator = func(Point, Tile) + type Point struct + X int16 + Y int16 + func At(x, y int16) Point + func (p Point) Add(p2 Point) Point + func (p Point) DistanceTo(other Point) uint32 + func (p Point) Divide(p2 Point) Point + func (p Point) DivideScalar(s int16) Point + func (p Point) Equal(other Point) bool + func (p Point) Integer() uint32 + func (p Point) Interleave() int32 + func (p Point) Multiply(p2 Point) Point + func (p Point) MultiplyScalar(s int16) Point + func (p Point) String() string + func (p Point) Subtract(p2 Point) Point + func (p Point) Within(nw, se Point) bool + func (p Point) WithinRect(box Rect) bool + func (p Point) WithinSize(size Point) bool + type Rect struct + Max Point + Min Point + func NewRect(left, top, bottom, right int16) Rect + func (r *Rect) Contains(p Point) bool + func (r *Rect) Intersects(box Rect) bool + func (r *Rect) Size() Point + type Tile [6]byte + type Update struct + type View struct + Grid *Grid + Inbox chan Update + func (v *View) At(x, y int16) (Tile, bool) + func (v *View) Close() error + func (v *View) Each(fn Iterator) + func (v *View) MergeAt(x, y int16, tile, mask Tile) + func (v *View) MoveAt(nw Point, fn Iterator) + func (v *View) MoveBy(x, y int16, fn Iterator) + func (v *View) Resize(box Rect, fn Iterator) + func (v *View) WriteAt(x, y int16, tile Tile)