Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultWidthScale = 2
)
Defaults for board
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Board ¶
type Board struct { Blocks [][]*Block // contains filtered or unexported fields }
Board represents the game board
func (*Board) Background ¶
Background returns the boards background color
func (*Board) ClearFullRows ¶
ClearFullRows checks if any rows are full and clears them if so
func (*Board) HiddenRows ¶
HiddenRows returns the number of rows that will be excluded when rendering
type Option ¶
type Option interface {
ApplyToBoard(b *Board)
}
Option represents a configuration option for the board
func WithBackground ¶
WithBackground returns an option specifies the background for the canvas and board
func WithHeight ¶
WithHeight returns an option the specifies the height of the board
func WithHiddenRows ¶
WithHiddenRows returns an option that specifies how many rows of the board shouldn't be rendered
func WithWidthScale ¶
WithWidthScale returns an option that specifies how blocks should be scaled to cells
Click to show internal directories.
Click to hide internal directories.