21 lines
353 B
Go
21 lines
353 B
Go
package stacks
|
|
|
|
import (
|
|
"git.vezzani.net/ben/games/common/elements/v1"
|
|
"git.vezzani.net/ben/games/common/elements/v1/blocks"
|
|
)
|
|
|
|
type Option func(*Stack)
|
|
|
|
func BlockOpt(o blocks.Option) Option {
|
|
return func(s *Stack) {
|
|
o(&s.Block)
|
|
}
|
|
}
|
|
|
|
func Children(children ...elements.ElementFunc) Option {
|
|
return func(s *Stack) {
|
|
s.children = children
|
|
}
|
|
}
|