Class: Shogi::Piece::UM

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

Constant Summary collapse

CSA_NAME =
"UM"
USI_NAME =
"+B"
MOVEMENTS =
[(-8..-1).collect {|a| [a,  a] },
( 1.. 8).collect {|a| [a,  a] },
(-8..-1).collect {|a| [a, -a] },
( 1.. 8).collect {|a| [a, -a] },
[[-1, 0], [0, -1], [0, 1], [1, 0]]].flatten(1)
CHILD =
"KA"

Instance Attribute Summary

Attributes inherited from Base

#csa, #promoter, #usi

Instance Method Summary collapse

Methods inherited from Base

#move?

Constructor Details

#initializeUM

Returns a new instance of UM.



66
67
68
# File 'lib/shogi/piece/promoter.rb', line 66

def initialize
  super(CSA_NAME, USI_NAME, MOVEMENTS)
end