aro 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/.release +1 -1
- data/bin/cli/deck.rb +1 -1
- data/checksums/aro-0.1.5.gem.sha512 +1 -1
- data/lib/aro/version.rb +2 -2
- data/lib/aro.rb +3 -0
- data/lib/models/deck.rb +13 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d38dfc3076510642fc060178b2de03eb366c527ac6e88c2bfeb746f85b0e6b9
|
|
4
|
+
data.tar.gz: c58bdbb118b84d1bd05709cf19942cf7ac69c1ab66cbdb91b916fe42fb7b0ab0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cf670b3a0bfefd708c9a6286218a4474394eb10b9669e359f3eec157052e0f6762a88e9f93ee31299bea09f9d0a41e51dbbf5019e42f1870ece83093dad00fe
|
|
7
|
+
data.tar.gz: 9ca02e7c6b8f772ae6ff92b4f392c32c4d8fa830611af35d8ddd3b1b455536d2b1af37e4ea4ed2a1e3ab1f0ec49d930b30a3e2c0c1f1498e841feb05ead09549
|
data/.release
CHANGED
data/bin/cli/deck.rb
CHANGED
|
@@ -39,7 +39,7 @@ module CLI
|
|
|
39
39
|
Aro::Mancy.game.shuffle
|
|
40
40
|
when CLI::LOAD_DECK_ACTIONS[:DRAW]
|
|
41
41
|
Aro::P.say(I18n.t("cli.messages.drawing", name: Aro::Mancy.game.name))
|
|
42
|
-
Aro::P.
|
|
42
|
+
Aro::P.say(I18n.t("cli.messages.drawing_from_dimension", dimension: "#{CLI::Config.var_value_with_suffix(:DIMENSION)}"))
|
|
43
43
|
Aro::Mancy.game.draw(
|
|
44
44
|
is_dt_dimension: CLI::Config.var_value_with_suffix(:DIMENSION)&.to_sym == CLI::Config::DMS[:DEV_TAROT],
|
|
45
45
|
z_max: CLI::Config.var_value_with_suffix(:Z_MAX).to_i,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
50df50a772a0a3c6d43f6427072c29c1f218b21fadda5029a17ed5ad44e2f06cce05596bf855e6028467f1dbc1932954f008bdddc2c76ddb39dc065980d4b1fb
|
data/lib/aro/version.rb
CHANGED
data/lib/aro.rb
CHANGED
data/lib/models/deck.rb
CHANGED
|
@@ -196,7 +196,7 @@ class Aro::Deck < ActiveRecord::Base
|
|
|
196
196
|
dt = nil
|
|
197
197
|
return dt unless File.exist?(Aro::Deck::DEV_TAROT_FILE)
|
|
198
198
|
|
|
199
|
-
File.open(Aro::Deck::DEV_TAROT_FILE, "r"){|dtf| dt = dtf.read(
|
|
199
|
+
File.open(Aro::Deck::DEV_TAROT_FILE, "r"){|dtf| dt = dtf.read(Aro::Mancy::N)}
|
|
200
200
|
|
|
201
201
|
# VERY IMPORTANT!
|
|
202
202
|
Aro::P.say(I18n.t("cli.very_important", dev_tarot: dt))
|
|
@@ -254,18 +254,25 @@ class Aro::Deck < ActiveRecord::Base
|
|
|
254
254
|
dev_tarot = summon_ruby_facot(cards_arr).split("")
|
|
255
255
|
else
|
|
256
256
|
# preferred randomness
|
|
257
|
-
|
|
257
|
+
read_value = Aro::Deck.read_dev_tarot&.strip&.split("")
|
|
258
|
+
if read_value.count >= Aro::Mancy::N - 1
|
|
259
|
+
dev_tarot = read_value
|
|
260
|
+
end
|
|
258
261
|
end
|
|
259
262
|
|
|
260
263
|
unless dev_tarot.nil?
|
|
261
|
-
abs_dev_tarot = dev_tarot[
|
|
262
|
-
dev_tarot.
|
|
264
|
+
abs_dev_tarot = dev_tarot[Aro::Mancy::S] + Aro::NUMERALS.key(
|
|
265
|
+
dev_tarot.join("")[Aro::Mancy::OS..].to_i
|
|
263
266
|
).to_s
|
|
264
267
|
if abs_cards_arr.include?(abs_dev_tarot)
|
|
265
268
|
# dev_tarot is valid
|
|
266
|
-
dev_tarot = dev_tarot[
|
|
269
|
+
dev_tarot = dev_tarot[Aro::Mancy::O] + abs_dev_tarot
|
|
270
|
+
else
|
|
271
|
+
dev_tarot = nil
|
|
267
272
|
end
|
|
268
|
-
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if dev_tarot.nil?
|
|
269
276
|
# dev_tarot is invalid
|
|
270
277
|
sleeps += 1
|
|
271
278
|
sleep(z.to_i)
|