Class: WhitePawn

Inherits:
WhitePiece 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 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) ⇒ 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_sObject



91
92
93
# File 'lib/pawn.rb', line 91

def to_s
  "WP"
end