Class: BlackKing
- Inherits:
-
BlackPiece
- Object
- EmptySpace
- Piece
- BlackPiece
- BlackKing
- Includes:
- King
- Defined in:
- lib/king.rb
Instance Attribute Summary collapse
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Attributes inherited from EmptySpace
Instance Method Summary collapse
-
#initialize(x, y) ⇒ BlackKing
constructor
A new instance of BlackKing.
- #to_s ⇒ Object
Methods included from King
Methods included from Moves
#diagonal, #horizontal, #move, #vertical
Methods inherited from BlackPiece
Methods inherited from EmptySpace
#empty?, #enemy_of?, #friend_of?, #place_on, #remove_from, #to_coord
Constructor Details
#initialize(x, y) ⇒ BlackKing
Returns a new instance of BlackKing.
97 98 99 100 101 |
# File 'lib/king.rb', line 97 def initialize(x,y) super @start = true @direction = -1 end |
Instance Attribute Details
#start ⇒ Object (readonly)
Returns the value of attribute start.
96 97 98 |
# File 'lib/king.rb', line 96 def start @start end |
Instance Method Details
#to_s ⇒ Object
103 104 105 |
# File 'lib/king.rb', line 103 def to_s "B!" end |