Sha256: 718043a0178757d486d5d58b465ac97e5d38b7f3b603f080c9d514b1063bde7d

Contents?: true

Size: 352 Bytes

Versions: 10

Compression:

Stored size: 352 Bytes

Contents

module Shogi
  module Piece
    class Base
      attr_reader :csa, :usi, :promoter
      def initialize(csa, usi, movements, promoter=nil)
        @csa = csa
        @usi = usi
        @movements = movements
        @promoter = promoter
      end

      def move?(width, height)
        @movements.include?([width, height])
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shogi-ruby-0.1.0 lib/shogi/piece/base.rb
shogi-ruby-0.0.9 lib/shogi/piece/base.rb
shogi-ruby-0.0.8 lib/shogi/piece/base.rb
shogi-ruby-0.0.7 lib/shogi/piece/base.rb
shogi-ruby-0.0.6 lib/shogi/piece/base.rb
shogi-ruby-0.0.5 lib/shogi/piece/base.rb
shogi-ruby-0.0.4 lib/shogi/piece/base.rb
shogi-ruby-0.0.3 lib/shogi/piece/base.rb
shogi-ruby-0.0.2 lib/shogi/piece/base.rb
shogi-ruby-0.0.1 lib/shogi/piece/base.rb