Class: Shogi::Piece::RY

Inherits:
Base
  • Object
show all
Defined in:
lib/shogi/piece/promoter.rb

Constant Summary collapse

CSA_NAME =
"RY"
USI_NAME =
"+R"
MOVEMENTS =
[(-8..-1).collect {|h| [0, h] },
( 1.. 8).collect {|h| [0, h] },
(-8..-1).collect {|w| [w, 0] },
( 1.. 8).collect {|w| [w, 0] },
[[-1, -1], [-1, 1], [1, -1], [1, 1]]].flatten(1)
CHILD =
"HI"

Instance Attribute Summary

Attributes inherited from Base

#csa, #promoter, #usi

Instance Method Summary collapse

Methods inherited from Base

#move?

Constructor Details

#initializeRY

Returns a new instance of RY.



81
82
83
# File 'lib/shogi/piece/promoter.rb', line 81

def initialize
  super(CSA_NAME, USI_NAME, MOVEMENTS)
end