refactor out a pattern for adding other commands
added dance, shrug.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
import "mcquay.me/yay"
|
||||
|
||||
type Dance struct {
|
||||
yay.Sequence
|
||||
}
|
||||
|
||||
func NewDance() *Dance {
|
||||
d := &Dance{
|
||||
yay.Sequence{
|
||||
Frames: [][]rune{
|
||||
[]rune(`<('o'<) `),
|
||||
[]rune(` ('-') `),
|
||||
[]rune(` (>'o')>`),
|
||||
[]rune(` ('-') `),
|
||||
[]rune(` ('-') `),
|
||||
[]rune(` ('-') `),
|
||||
[]rune(` (>'o')>`),
|
||||
},
|
||||
},
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
func main() {
|
||||
t := yay.NewViewPort(NewDance())
|
||||
t.Run()
|
||||
}
|
||||
Reference in New Issue
Block a user