Browse Source

added claps

Stephen McQuay 2 years ago
parent
commit
3dab222c48
No known key found for this signature in database
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 @@
1
+package yay
2
+
3
+type Claps struct {
4
+	Sequence
5
+}
6
+
7
+func NewClaps() *Dance {
8
+	d := &Dance{
9
+		Sequence{
10
+			Frames: [][]rune{
11
+				[]rune(`\\o`),
12
+				[]rune(`\o/`),
13
+				[]rune(`\o/`),
14
+				[]rune(`\o/`),
15
+
16
+				[]rune(`\\o`),
17
+				[]rune(`\o/`),
18
+				[]rune(`\\o`),
19
+				[]rune(`\o/`),
20
+
21
+				[]rune(`\o/`),
22
+				[]rune(`\o/`),
23
+				[]rune(`\o/`),
24
+				[]rune(`\o/`),
25
+			},
26
+		},
27
+	}
28
+	return d
29
+}

+ 10
- 0
cmd/yay/main.go View File

@@ -41,6 +41,15 @@ func main() {
41 41
 		},
42 42
 	}
43 43
 
44
+	claps := &cobra.Command{
45
+		Use:   "claps",
46
+		Short: "clap it, clap it!!",
47
+		Run: func(cmd *cobra.Command, args []string) {
48
+			t := yay.NewViewPort(yay.NewClaps(), time.Duration(frameRate)*time.Millisecond)
49
+			t.Run()
50
+		},
51
+	}
52
+
44 53
 	version := &cobra.Command{
45 54
 		Use:   "version",
46 55
 		Short: "prints the version to stdout",
@@ -50,6 +59,7 @@ func main() {
50 59
 	}
51 60
 	main.AddCommand(shrug)
52 61
 	main.AddCommand(dance)
62
+	main.AddCommand(claps)
53 63
 	main.AddCommand(version)
54 64
 	main.Execute()
55 65
 }

Loading…
Cancel
Save