Class: WhiteRook

Inherits:
WhitePiece 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 WhitePiece

#enemy_of?, #friend_of?

Methods inherited from EmptySpace

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

Constructor Details

#initialize(x, y) ⇒ WhiteRook

Returns a new instance of WhiteRook.



32
33
34
35
# File 'lib/rook.rb', line 32

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

Instance Attribute Details

#startObject (readonly)

Returns the value of attribute start.



31
32
33
# File 'lib/rook.rb', line 31

def start
  @start
end

Instance Method Details

#to_sObject



37
38
39
# File 'lib/rook.rb', line 37

def to_s
  "WR"
end