Class: Checkers::JumpMove

Inherits:
Move
  • Object
show all
Defined in:
lib/checkers/jump_move.rb

Instance Attribute Summary collapse

Attributes inherited from Move

#end_square, #start_square

Instance Method Summary collapse

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_squareObject (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