Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSeed = errors.New("seed: seed is invalid")
Functions ¶
This section is empty.
Types ¶
type Coordinate ¶
type Coordinate struct {
X, Y int
}
func (Coordinate) Neighbors ¶
func (c Coordinate) Neighbors(w, h int) iter.Seq[Coordinate]
func (Coordinate) Valid ¶
func (c Coordinate) Valid(w, h int) bool
type Game ¶
type Game struct {
// contains filtered or unexported fields
}
func New ¶
func New(w, h int, init ...Initializer) *Game
type Initializer ¶
type Initializer func(w, h int) (map[Coordinate]struct{}, []uint64, Seed)
func Randomized ¶
func Randomized() Initializer
func WithSeed ¶
func WithSeed(seed Seed) Initializer
Click to show internal directories.
Click to hide internal directories.