added claps

This commit is contained in:
sm
2016-06-02 16:33:36 -07:00
parent 9f47b066db
commit 3dab222c48
2 changed files with 39 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package yay
type Claps struct {
Sequence
}
func NewClaps() *Dance {
d := &Dance{
Sequence{
Frames: [][]rune{
[]rune(`\\o`),
[]rune(`\o/`),
[]rune(`\o/`),
[]rune(`\o/`),
[]rune(`\\o`),
[]rune(`\o/`),
[]rune(`\\o`),
[]rune(`\o/`),
[]rune(`\o/`),
[]rune(`\o/`),
[]rune(`\o/`),
[]rune(`\o/`),
},
},
}
return d
}
+10
View File
@@ -41,6 +41,15 @@ func main() {
}, },
} }
claps := &cobra.Command{
Use: "claps",
Short: "clap it, clap it!!",
Run: func(cmd *cobra.Command, args []string) {
t := yay.NewViewPort(yay.NewClaps(), time.Duration(frameRate)*time.Millisecond)
t.Run()
},
}
version := &cobra.Command{ version := &cobra.Command{
Use: "version", Use: "version",
Short: "prints the version to stdout", Short: "prints the version to stdout",
@@ -50,6 +59,7 @@ func main() {
} }
main.AddCommand(shrug) main.AddCommand(shrug)
main.AddCommand(dance) main.AddCommand(dance)
main.AddCommand(claps)
main.AddCommand(version) main.AddCommand(version)
main.Execute() main.Execute()
} }