Class: Tundengine::TuteValues::Capotes

Inherits:
Base
  • Object
show all
Includes:
AlgebraicDataType
Defined in:
lib/tundengine/tute_values/capotes.rb

Instance Method Summary collapse

Methods included from AlgebraicDataType

#==, #hash, #to_s

Methods inherited from Base

#finishes_round?, #has_effect?

Methods included from StringifiableByClass

#to_s

Constructor Details

#initialize(points) ⇒ Capotes

Returns a new instance of Capotes.



7
8
9
10
# File 'lib/tundengine/tute_values/capotes.rb', line 7

def initialize(points)
  @points = points
  super()
end

Instance Method Details

#identifierObject



16
17
18
# File 'lib/tundengine/tute_values/capotes.rb', line 16

def identifier
  [@points]
end

#points_for_loser(loser, max_points) ⇒ Object



12
13
14
# File 'lib/tundengine/tute_values/capotes.rb', line 12

def points_for_loser(loser, max_points)
  [@points, max_points].min
end