Method: ChessData::ExactCount#check
- Defined in:
- lib/chess_data/position-definition.rb
#check(board) ⇒ Object
Returns true if board contains n of piece
83 84 85 |
# File 'lib/chess_data/position-definition.rb', line 83 def check board board.count(@piece) == @n end |