class Sashite::Cpn::PiecesInHand

Pieces in hand class.

Attributes

pieces[R]

@!attribute [r] pieces

@return [Array] The list of pieces in hand.

Public Class Methods

new(*pieces) click to toggle source

@param pieces [Array] The list of pieces in hand.

# File lib/sashite/cpn/pieces_in_hand.rb, line 8
def initialize(*pieces)
  @pieces = pieces.map(&:to_s).sort
end

Public Instance Methods

to_s() click to toggle source

@return [String] A string representation.

# File lib/sashite/cpn/pieces_in_hand.rb, line 18
def to_s
  pieces.join(',')
end