Class: ChessData::PieceDefn

Inherits:
Struct
  • Object
show all
Defined in:
lib/chess_data/board.rb

Overview

Pieces are structures, made from:

  • piece: is a string “P”, “p”, “N”, “n”, etc

  • square: is square definition, either a symbol :e4 or string “E4”

Instance Attribute Summary collapse

Instance Attribute Details

#pieceObject

Returns the value of attribute piece

Returns:

  • (Object)

    the current value of piece



7
8
9
# File 'lib/chess_data/board.rb', line 7

def piece
  @piece
end

#squareObject

Returns the value of attribute square

Returns:

  • (Object)

    the current value of square



7
8
9
# File 'lib/chess_data/board.rb', line 7

def square
  @square
end