Class: Queen

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

Constant Summary collapse

DELTAS =
[
  [ 1,  1],
  [ 1,  0],
  [ 1, -1],
  [ 0, -1],
  [-1, -1],
  [-1,  0],
  [-1,  1],
  [ 0,  1],
]

Instance Attribute Summary

Attributes inherited from Piece

#board, #color, #pos

Instance Method Summary collapse

Methods inherited from SlidingPiece

#potential_moves

Methods inherited from Piece

#deltas, #dup, #initialize, #move_into_check?, #moves, #next_pos, #update_piece, #valid_moves, #valid_pos?

Constructor Details

This class inherits a constructor from Piece

Instance Method Details

#to_sObject



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

def to_s
  color == :W ? "\u2655" : "\u265B"
end