class Shogi::Piece::Base
Attributes
csa[R]
promoter[R]
usi[R]
Public Class Methods
new(csa, usi, movements, promoter=nil)
click to toggle source
# File lib/shogi/piece/base.rb, line 5 def initialize(csa, usi, movements, promoter=nil) @csa = csa @usi = usi @movements = movements @promoter = promoter end
Public Instance Methods
move?(width, height)
click to toggle source
# File lib/shogi/piece/base.rb, line 12 def move?(width, height) @movements.include?([width, height]) end