22 lines
305 B
Go
22 lines
305 B
Go
package stacks
|
|
|
|
import (
|
|
"git.vezzani.net/ben/games/common/elements/v1/core"
|
|
)
|
|
|
|
type OptFunc func(*Stack)
|
|
|
|
func Core(fs ...core.OptFunc) OptFunc {
|
|
return func(s *Stack) {
|
|
for _, f := range fs {
|
|
f(&s.Element)
|
|
}
|
|
}
|
|
}
|
|
|
|
func Horizontal() OptFunc {
|
|
return func(s *Stack) {
|
|
s.horizontal = true
|
|
}
|
|
}
|