Class: ConsoleShogi::Fu
- Inherits:
-
Piece
- Object
- Piece
- ConsoleShogi::Fu
show all
- Defined in:
- lib/console_shogi/piece.rb
Constant Summary
collapse
- NUMBER =
1
Instance Attribute Summary
Attributes inherited from Piece
#teban
Instance Method Summary
collapse
Methods inherited from Piece
#active_image, #can_move_long_distance?, #change_player!, #focused_image, #fu?, #image, #initialize, #move, #moves, #none?, #number, #promote, #promoted?, #same?
Instance Method Details
#base_moves ⇒ Object
100
101
102
103
104
|
# File 'lib/console_shogi/piece.rb', line 100
def base_moves
[
{x: 0, y: -1}
]
end
|
106
107
108
|
# File 'lib/console_shogi/piece.rb', line 106
def can_promote?
true
end
|
110
111
112
|
# File 'lib/console_shogi/piece.rb', line 110
def promoted
PromotedPiece::Tokin.new(original: self)
end
|