enjoy_markov 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3ce40217653a79de60de9648eccdfa3c7b34615
4
- data.tar.gz: 49ccf2b43d532eb25cbe1701703d42de5e58ba2c
3
+ metadata.gz: f6c065a65983dda60d64aa6f0bba2f3d06eb56b6
4
+ data.tar.gz: 2b8262763ad810e61f9b751791f7d60a17e29152
5
5
  SHA512:
6
- metadata.gz: bd06ec7f305816699c8d48510fca74f2ed095af30e12090fa3c5ca29fc0c612b36a157c376a3708a348e6673898e62c631d9b41c5da5737009e7e57dfc2548fd
7
- data.tar.gz: 2e9e3805ded065fe28f80ab8609d1511fa3494bf6c30a5ef94c10967f7934cefcbd146fc3d25fe16dd8705a3ab01d4acf97c6d5e117975a28ab9b4d1845874d5
6
+ metadata.gz: 98179eed00b2756a65d29da24d8309065e8e8ebfcd77bfbca139bd549a6900e968bde0c1ebca814f96aca57035fc637905d54510814d6ebd94b32451f2a22eca
7
+ data.tar.gz: a987b60ae49423f8a909d9e11f10e12cc7eb58e993cd4fabb5809ef581360ca178571895d0219b85a49669d6cd89b55fec302334ae4074dab47275c432c7f0a5
@@ -1,3 +1,3 @@
1
1
  class EnjoyMarkov
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/enjoy_markov.rb CHANGED
@@ -1,11 +1,19 @@
1
1
  class EnjoyMarkov
2
- def self.start!(supinf=20)
3
- @@x = 0
4
- loop do
5
- @@x += [-1, 1].sample # TODO: use prefer randmGen
6
- raise 'ops.. ;(' if supinf == @@x.abs
7
- p %!#{"\s" * supinf}|#{"\s" * supinf}!.tap { |s| s[@@x + supinf] = '*' }
8
- sleep 0.05
2
+ class << self
3
+ def start!(supinf=20)
4
+ @@x = 0
5
+ loop do
6
+ @@x += [-1, 1].sample # TODO: use prefer randmGen
7
+ raise 'ops.. ;(' if supinf == @@x.abs
8
+ puts "#{wall}#{space * supinf}#{axis}#{space * supinf}#{wall}".tap { |s| s[@@x + supinf + 1] = point }
9
+ sleep 0.05
10
+ end
9
11
  end
12
+
13
+ private
14
+ def axis; "|" end
15
+ def wall; "|" end
16
+ def point; "\e[31m*\e[0m" end
17
+ def space; "\s" end
10
18
  end
11
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enjoy_markov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gogotanaka