Class: ChessData::Counter
- Inherits:
-
Object
- Object
- ChessData::Counter
- Defined in:
- lib/chess_data/position-definition.rb
Overview
parent class for the different types of count comparators
Direct Known Subclasses
Instance Attribute Summary collapse
-
#piece ⇒ Object
readonly
Returns the value of attribute piece.
Instance Method Summary collapse
-
#initialize(n, piece) ⇒ Counter
constructor
Each counter has a target piece and reference number n.
Constructor Details
#initialize(n, piece) ⇒ Counter
Each counter has a target piece and reference number n.
73 74 75 76 |
# File 'lib/chess_data/position-definition.rb', line 73 def initialize n, piece @n = n @piece = piece end |
Instance Attribute Details
#piece ⇒ Object (readonly)
Returns the value of attribute piece.
70 71 72 |
# File 'lib/chess_data/position-definition.rb', line 70 def piece @piece end |