class Tundengine::Ranks::Base

Attributes

power[R]
round_points[R]

Public Class Methods

de(suit) click to toggle source
# File lib/tundengine/ranks/base.rb, line 11
def self.de(suit)
  instance.de(suit)
end
new() click to toggle source
# File lib/tundengine/ranks/base.rb, line 24
def initialize
  @round_points = self.class::ROUND_POINTS
  @power        = self.class::POWER
end

Public Instance Methods

<=>(other_rank) click to toggle source
# File lib/tundengine/ranks/base.rb, line 20
def <=>(other_rank)
  @power <=> other_rank.power
end
de(suit) click to toggle source
# File lib/tundengine/ranks/base.rb, line 15
def de(suit)
  s = suit.is_a?(Suits::Base) ? suit : suit.instance
  Cards::Card.new(self, s)
end