Browse Source

added claps

master
Stephen McQuay 5 years ago
parent
commit
3dab222c48
No known key found for this signature in database GPG Key ID: 1ABF428F71BAFC3D
  1. 29
      claps.go
  2. 10
      cmd/yay/main.go

29
claps.go

@ -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
cmd/yay/main.go

@ -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()
}
Loading…
Cancel
Save