Extract common method

This commit is contained in:
Jorge Manrubia
2025-09-16 13:05:53 +02:00
parent c56eb9ecd1
commit 6fe28c53e7
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ module EntropyHelper
end
def card_entropy_action(card)
if card.doing? || card.on_deck?
if card.stagnated?
"Falls Back"
elsif card.considering?
"Closes"
+4
View File
@@ -48,4 +48,8 @@ module Card::Entropic
def entropic?
entropy.present?
end
def stagnated?
card.doing? || card.on_deck?
end
end
+1 -1
View File
@@ -7,7 +7,7 @@ class Card::Entropy
if card.considering?
new(card, card.auto_close_period)
elsif card.doing? || card.on_deck?
elsif card.stagnated?
new(card, card.auto_reconsider_period)
end
end