KirbyDance 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kirbydance.rb +58 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d203cf92ae93b0f4d4a5f8ae59aa2cfcd98c6a7
4
- data.tar.gz: 0dda4d7a3c2826486724b6bb5ca3fdd25627133f
3
+ metadata.gz: 8876dcbabe8b389a07325710958d2a84feb4bf89
4
+ data.tar.gz: 9922916a87768b185f377fa1d16f2c207cfa9983
5
5
  SHA512:
6
- metadata.gz: f525d69b6f96deaa580aa1e6b2346f89bbbeb073a8f5adabe4e53fd3cb5a2d4ccb6d56d37bf3b9059b2dfff64f76ce4090949ec888f23f599f79266fab2ef2ca
7
- data.tar.gz: 1813d293e19cba790d524a35f6a13a93fdd733a6d01509368e9855cf79fb0c8e4d6551019fca3886168ea065aa3d8a756b75f6628b5ede442df9d502e1519e1d
6
+ metadata.gz: d4352d7dc146d8de020e352289100a67f05a4f9d022c275226bfa7dacadcbcd3234cd91bf208c37e20633b343c858911cd63d9668fc85f706bd9a064663d9848
7
+ data.tar.gz: 5f3db116508a675ee9453f8520f7b93a020894f8db8ff15d04389d3327d5ea8707a105d2aae27e6f8298ebd984b38d624a72c99b454b4685cef545ad56f617b5
data/lib/kirbydance.rb CHANGED
@@ -1,20 +1,62 @@
1
- % cat lib/kirbydance
2
1
  class Kirby
2
+ def self.zzz
3
+ sleep 0.10
4
+ end
5
+
3
6
  def self.dance
4
- puts "(>'-')>"
5
- puts " <('-'<)"
6
- puts " (>'-')>"
7
- puts " <('-'<)"
8
- puts " (>'-')>"
9
- puts " <('-'<)"
10
- puts " (>'-')>"
11
- puts " <('-'<)"
12
- puts " (>'-')>"
13
- puts " <('-'<)"
14
- puts " (>'-')>"
15
- puts " <('-'<)"
16
- puts " (>'-')>"
17
- puts " <('-'<)"
18
- puts "(>'-')>"
7
+ # Look for 'We da best' and replace with something cooler
8
+ signature = lambda do |str|
9
+ if str == 'We da best'
10
+ return ">>> SWAG <<<"
11
+ end
12
+ end
13
+
14
+ # This will be how many times the kirbies dance (10)
15
+ puts "How many times will Kirby dance for you?"
16
+
17
+ rotations = gets.chomp.to_i
18
+
19
+ puts rotations
20
+
21
+ rotations ||= 5 # In case the user hasn't submitted a number
22
+
23
+ dance_moves = [
24
+ "(>'-')>",
25
+ " <('-'<)",
26
+ " (>'-')>",
27
+ " <('-'<)",
28
+ " (>'-')>",
29
+ " <('-'<)",
30
+ " (>'-')>"
31
+ ]
32
+
33
+ num_dance_moves = dance_moves.length
34
+
35
+ =begin
36
+
37
+ This is where we will find the amount of times the array loops
38
+
39
+ Rotations = User Input
40
+ Length = `dance_moves` Length
41
+
42
+ =end
43
+
44
+ n = rotations * num_dance_moves * 2 # times 2 for reverse as well
45
+
46
+ counter = 0
47
+
48
+ n.times do |x|
49
+ puts dance_moves[counter] + x.to_s
50
+ zzz()
51
+
52
+ counter += 1
53
+
54
+ if x % num_dance_moves == 0 && x > 0
55
+ dance_moves.reverse!
56
+ counter = 0
57
+ end
58
+ end
59
+
60
+ print signature.call('We da best') unless rotations == 5
19
61
  end
20
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: KirbyDance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shayne Statzell