refactor out a pattern for adding other commands

added dance, shrug.
This commit is contained in:
sm
2015-06-21 01:00:57 -07:00
parent 32303f3950
commit 8bb4706228
5 changed files with 125 additions and 40 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import "mcquay.me/yay"
type Shrug struct {
yay.Sequence
}
func NewShrug() *Shrug {
return &Shrug{
yay.Sequence{
Frames: [][]rune{
[]rune(`¯\_(ツ )_/¯`),
[]rune(`¯\_(ツ )_/¯`),
[]rune(`¯\_(ツ )_/¯`),
[]rune(`¯\-(ツ )-/¯`),
[]rune(`¯\_(ツ )_/¯`),
[]rune(`¯\-(ツ )-/¯`),
},
},
}
}
func main() {
t := yay.NewViewPort(NewShrug())
t.Run()
}