Class: Tundengine::Declarations::Tute

Inherits:
Base
  • Object
show all
Includes:
Singleton
Defined in:
lib/tundengine/declarations/tute.rb

Constant Summary collapse

ROUND_POINTS =
:no_round_points

Instance Attribute Summary

Attributes inherited from Base

#round_points

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Move

#self_or_yield, #yield_self_or_lock!

Methods included from StringifiableByClass

#to_s

Constructor Details

This class inherits a constructor from Tundengine::Declarations::Base

Instance Method Details

#finishes_round?(tute_value) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/tundengine/declarations/tute.rb', line 17

def finishes_round?(tute_value)
  tute_value.finishes_round?
end

#has_tute_effect?(tute_value) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/tundengine/declarations/tute.rb', line 13

def has_tute_effect?(tute_value)
  tute_value.has_effect?
end

#is_declarable?(hand, trump_suit) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/tundengine/declarations/tute.rb', line 9

def is_declarable?(hand, trump_suit)
  [Ranks::Once, Ranks::Doce].any? { |rank| hand.has_all_of? rank.instance }
end