Class: Bishop

Inherits:
SlidingPiece show all
Defined in:
lib/pieces/bishop.rb

Instance Attribute Summary

Attributes inherited from Piece

#color, #moved, #pos

Instance Method Summary collapse

Methods inherited from SlidingPiece

#explore, #moves

Methods inherited from Piece

#dup, #in_range_of_enemy?, #initialize, #move_into_check?, #sum_positions, #valid_moves

Constructor Details

This class inherits a constructor from Piece

Instance Method Details

#move_dirsObject



9
10
11
12
13
14
# File 'lib/pieces/bishop.rb', line 9

def move_dirs
  [[1, 1],
  [-1, 1],
  [1, -1],
  [-1, -1]]
end

#symbolObject



5
6
7
# File 'lib/pieces/bishop.rb', line 5

def symbol
  '♝'
end

#valueObject



16
17
18
# File 'lib/pieces/bishop.rb', line 16

def value
  3
end