Documentation
¶
Index ¶
- type Board
- func (b *Board) Clone() *Board
- func (b *Board) Columns() int
- func (b *Board) Data() *bitmap.BitMap
- func (b *Board) IsAlive(p Point) (bool, error)
- func (b *Board) IsAliveNextCycle(p Point) (bool, error)
- func (b *Board) IsDead(p Point) (bool, error)
- func (b *Board) IsDeadNextCycle(p Point) (bool, error)
- func (b *Board) NextBoard() (*Board, error)
- func (b *Board) Points() iter.Seq[Point]
- func (b *Board) Rows() int
- func (b *Board) Set(p Point, isAlive bool) error
- type InvalidPointError
- type NewBoardError
- type Point
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidPointError ¶
func (InvalidPointError) Error ¶
func (e InvalidPointError) Error() string
func (InvalidPointError) Unwrap ¶
func (e InvalidPointError) Unwrap() error
type NewBoardError ¶
type NewBoardError struct {
Origin error
}
func (NewBoardError) Error ¶
func (e NewBoardError) Error() string
type Point ¶
type Point struct {
Row, Column int
}
func (Point) Neighbours ¶
Neighbours returns the list of possible neighboring points. Some of the might be invalid in the game board.
Click to show internal directories.
Click to hide internal directories.