Documentation ¶
Index ¶
- func Directions() iter.Seq[Direction]
- func Enum[T constraints.Integer](opts ...rune) func(rune) (T, error)
- func Find[T comparable](g *Grid[T], v T) iter.Seq[Pos]
- type Direction
- type Grid
- func (g *Grid[T]) All() iter.Seq2[Pos, T]
- func (g *Grid[T]) At(p Pos) T
- func (g *Grid[T]) Bounds() Rectangle
- func (g *Grid[T]) Clone() *Grid[T]
- func (g *Grid[T]) Neigh4(p Pos) iter.Seq2[Pos, T]
- func (g *Grid[T]) Pos(i int) Pos
- func (g *Grid[T]) Rect(r Rectangle) iter.Seq2[Pos, T]
- func (g *Grid[T]) Set(p Pos, v T)
- func (g *Grid[T]) String() string
- func (g *Grid[T]) Valid(p Pos) bool
- type Pos
- type Rectangle
- func (r Rectangle) Add(p Pos) Rectangle
- func (r Rectangle) All() iter.Seq[Pos]
- func (r Rectangle) Canon() Rectangle
- func (r Rectangle) Contains(p Pos) bool
- func (r Rectangle) Empty() bool
- func (r Rectangle) Eq(s Rectangle) bool
- func (r Rectangle) Height() int
- func (r Rectangle) Hull(s Rectangle) Rectangle
- func (r Rectangle) In(s Rectangle) bool
- func (r Rectangle) Inset(n int) Rectangle
- func (r Rectangle) Intersect(s Rectangle) Rectangle
- func (r Rectangle) Overlaps(s Rectangle) bool
- func (r Rectangle) Width() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Directions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.