refactor out a pattern for adding other commands

added dance, shrug.
This commit is contained in:
sm
2015-06-21 01:00:57 -07:00
parent 32303f3950
commit 8bb4706228
5 changed files with 125 additions and 40 deletions
+11
View File
@@ -0,0 +1,11 @@
package yay
type Sequence struct {
Frame int
Frames [][]rune
}
func (s *Sequence) Next() []rune {
s.Frame += 1
return s.Frames[s.Frame%len(s.Frames)]
}