Browse Source

added claps

master
Stephen McQuay 4 years ago
parent
commit
3dab222c48
No known key found for this signature in database GPG Key ID: 1ABF428F71BAFC3D
2 changed files with 39 additions and 0 deletions
  1. +29
    -0
      claps.go
  2. +10
    -0
      cmd/yay/main.go

+ 29
- 0
claps.go 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
- 0
cmd/yay/main.go 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{
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