grid

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

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Air      Material = "."
	Rock              = "#"
	Sand              = "o"
	Source            = "+"
	SandPath          = "~"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Coordinate

type Coordinate struct {
	X int
	Y int
}

type Grid

type Grid struct {
	Min Coordinate
	Max Coordinate
	// contains filtered or unexported fields
}

func New

func New(source Coordinate) *Grid

func (*Grid) Get

func (g *Grid) Get(pos Coordinate) Material

func (*Grid) Print

func (g *Grid) Print()

func (*Grid) Set

func (g *Grid) Set(pos Coordinate, mat Material)

func (*Grid) SetXY

func (g *Grid) SetXY(x, y int, mat Material)

type Material

type Material string

type Path

type Path []Coordinate

Jump to

Keyboard shortcuts

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