Class: WhitePawn
- Inherits:
-
WhitePiece
- Object
- EmptySpace
- Piece
- WhitePiece
- WhitePawn
- 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) ⇒ WhitePawn
constructor
A new instance of WhitePawn.
- #to_s ⇒ Object
Methods included from Pawn
Methods inherited from WhitePiece
Methods inherited from EmptySpace
#empty?, #enemy_of?, #friend_of?, #place_on, #remove_from, #to_coord
Constructor Details
#initialize(x, y) ⇒ WhitePawn
Returns a new instance of WhitePawn.
84 85 86 87 88 89 |
# File 'lib/pawn.rb', line 84 def initialize(x,y) super @start = true @direction = 1 @queen = WhiteQueen end |
Instance Method Details
#to_s ⇒ Object
91 92 93 |
# File 'lib/pawn.rb', line 91 def to_s "WP" end |