Sha256: 0e7e32bc23d8eb3c2197d329c5c92f6d94ee4421b7f12ca6b99427dcb1c34a9a
Contents?: true
Size: 409 Bytes
Versions: 5
Compression:
Stored size: 409 Bytes
Contents
class Piece # @!attribute [r] type # @return [PieceType] attr_reader :type # @!attribute [r] color # @return [PlayerColor] attr_reader :color def initialize(color, type) @type = type @color = color end def ==(other) type == other.type && color == other.color end def owner color end def to_s color.value + type.value end def inspect to_s end end
Version data entries
5 entries across 5 versions & 1 rubygems