Class: BlackPawn

Inherits:
BlackPiece show all
Includes:
Pawn
Defined in:
lib/pawn.rb

Instance Attribute Summary

Attributes included from Pawn

#direction

Attributes inherited from EmptySpace

#color

Instance Method Summary collapse

Methods included from Pawn

#illegal, #jumped?, #move

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) ⇒ BlackPawn

Returns a new instance of BlackPawn.



100
101
102
103
104
105
# File 'lib/pawn.rb', line 100

def initialize(x,y)
  super
  @start = true
  @direction = -1
  @queen = BlackQueen
end

Instance Method Details

#to_sObject



107
108
109
# File 'lib/pawn.rb', line 107

def to_s
  "BP"
end