Class: Shogi::Piece::KA

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

Constant Summary collapse

CSA_NAME =
"KA"
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] }].flatten(1)
PROMOTER =
UM

Instance Attribute Summary

Attributes inherited from Base

#csa, #promoter, #usi

Instance Method Summary collapse

Methods inherited from Base

#move?

Constructor Details

#initializeKA

Returns a new instance of KA.



79
80
81
# File 'lib/shogi/piece.rb', line 79

def initialize
  super(CSA_NAME, USI_NAME, MOVEMENTS, PROMOTER)
end