class Sashite::Cpn::Turn
Turn
class.
Public Class Methods
new(b)
click to toggle source
@param b [Boolean] The turn to play (topside: true, bottomside: false).
# File lib/sashite/cpn/turn.rb, line 8 def initialize(b) @b = b end
Public Instance Methods
to_s()
click to toggle source
@return [String] A string representation.
# File lib/sashite/cpn/turn.rb, line 18 def to_s if turn_to_topside? 't' else 'B' end end
turn_to_topside?()
click to toggle source
@return [Boolean] Returns false when the turn to play is for bottom.
# File lib/sashite/cpn/turn.rb, line 13 def turn_to_topside? @b end