Class: BlackPawn
- Inherits:
-
BlackPiece
- Object
- EmptySpace
- Piece
- BlackPiece
- BlackPawn
- Includes:
- Pawn
- Defined in:
- lib/pawn.rb
Instance Attribute Summary
Attributes included from Pawn
Attributes inherited from EmptySpace
Instance Method Summary collapse
-
#initialize(x, y) ⇒ BlackPawn
constructor
A new instance of BlackPawn.
- #to_s ⇒ Object
Methods included from Pawn
Methods inherited from BlackPiece
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_s ⇒ Object
107 108 109 |
# File 'lib/pawn.rb', line 107 def to_s "BP" end |