Class: Shogi::Piece::HI

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

Constant Summary collapse

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

Instance Attribute Summary

Attributes inherited from Base

#csa, #promoter, #usi

Instance Method Summary collapse

Methods inherited from Base

#move?

Constructor Details

#initializeHI

Returns a new instance of HI.



93
94
95
# File 'lib/shogi/piece.rb', line 93

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