Class: ConsoleShogi::PromotedPiece::NariKin

Inherits:
ConsoleShogi::PromotedPiece show all
Defined in:
lib/console_shogi/piece.rb

Direct Known Subclasses

Narigin, Narikei, Narikyo, Tokin

Constant Summary collapse

NUMBER =
9

Instance Attribute Summary

Attributes inherited from ConsoleShogi::PromotedPiece

#original

Attributes inherited from ConsoleShogi::Piece

#teban

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_movesObject



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