cave

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cave

type Cave struct {
	Grid *grid.Grid
	// contains filtered or unexported fields
}

func New

func New(sandSource grid.Coordinate, rockPaths []grid.Path, physics Faller) *Cave

func (*Cave) FillSand

func (c *Cave) FillSand() int

func (*Cave) ProduceSand

func (c *Cave) ProduceSand() (*grid.Coordinate, bool)

func (*Cave) SetFloor

func (c *Cave) SetFloor(level int)

type Faller

type Faller interface {
	Fall(pos *grid.Coordinate, g *grid.Grid) bool
}

Jump to

Keyboard shortcuts

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