sm
/
yay
1
0
Bifurcation 0
Cette révision appartient à :
Stephen McQuay 2016-06-02 16:33:36 -07:00
Parent 9f47b066db
révision 3dab222c48
Signature inconnue de Gitea
ID de la clé GPG: 1ABF428F71BAFC3D
2 fichiers modifiés avec 39 ajouts et 0 suppressions

29
claps.go Fichier normal
Voir le fichier

@ -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
}

Voir le fichier

@ -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{
Use: "version",
Short: "prints the version to stdout",
@ -50,6 +59,7 @@ func main() {
}
main.AddCommand(shrug)
main.AddCommand(dance)
main.AddCommand(claps)
main.AddCommand(version)
main.Execute()
}