Class: ConsoleShogi::PromotedPiece::NariKin
- Inherits:
-
ConsoleShogi::PromotedPiece
- Object
- ConsoleShogi::Piece
- ConsoleShogi::PromotedPiece
- ConsoleShogi::PromotedPiece::NariKin
- Defined in:
- lib/console_shogi/piece.rb
Constant Summary collapse
- NUMBER =
9
Instance Attribute Summary
Attributes inherited from ConsoleShogi::PromotedPiece
Attributes inherited from ConsoleShogi::Piece
Instance Method Summary collapse
Methods inherited from ConsoleShogi::PromotedPiece
#can_promote?, #initialize, #promoted?, #teban, #teban=
Methods inherited from ConsoleShogi::Piece
#active_image, #can_move_long_distance?, #change_player!, #focused_image, #fu?, #image, #initialize, #move, #moves, #none?, #number, #promote, #promoted?, #same?
Constructor Details
This class inherits a constructor from ConsoleShogi::PromotedPiece
Instance Method Details
#base_moves ⇒ Object
286 287 288 289 290 291 292 293 294 295 |
# File 'lib/console_shogi/piece.rb', line 286 def base_moves [ {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 1, y: 0}, {x: -1, y: 0}, {x: 0, y: 1} ] end |