Class: Checkers::JumpMove
Instance Attribute Summary collapse
-
#jump_over_square ⇒ Object
readonly
Returns the value of attribute jump_over_square.
Attributes inherited from Move
Instance Method Summary collapse
-
#initialize(start_square, end_square) ⇒ JumpMove
constructor
A new instance of JumpMove.
Methods inherited from Move
Constructor Details
#initialize(start_square, end_square) ⇒ JumpMove
Returns a new instance of JumpMove.
7 8 9 10 |
# File 'lib/checkers/jump_move.rb', line 7 def initialize(start_square, end_square) super @jump_over_square = calculate_jump_over_square end |
Instance Attribute Details
#jump_over_square ⇒ Object (readonly)
Returns the value of attribute jump_over_square.
5 6 7 |
# File 'lib/checkers/jump_move.rb', line 5 def jump_over_square @jump_over_square end |