Class: BlackRook

Inherits:
BlackPiece show all
Includes:
Rook
Defined in:
lib/rook.rb

Instance Attribute Summary collapse

Attributes inherited from EmptySpace

#color

Instance Method Summary collapse

Methods included from Rook

#illegal

Methods included from Moves

#diagonal, #horizontal, #move, #vertical

Methods inherited from BlackPiece

#enemy_of?, #friend_of?

Methods inherited from EmptySpace

#empty?, #enemy_of?, #friend_of?, #place_on, #remove_from, #to_coord

Constructor Details

#initialize(x, y) ⇒ BlackRook

Returns a new instance of BlackRook.



47
48
49
50
# File 'lib/rook.rb', line 47

def initialize(x,y)
  super
  @start = true
end

Instance Attribute Details

#startObject (readonly)

Returns the value of attribute start.



46
47
48
# File 'lib/rook.rb', line 46

def start
  @start
end

Instance Method Details

#to_sObject



52
53
54
# File 'lib/rook.rb', line 52

def to_s
  "BR"
end