Sha256: daf58679f18ad3b7ae0532c57afc0cd7f9e5a66534ce267ac316db78e5e69836

Contents?: true

Size: 602 Bytes

Versions: 9

Compression:

Stored size: 602 Bytes

Contents

# frozen-string-literal: true

module Bioshogi
  module Board
    class << self
      def new(...)
        Basic.new(...)
      end

      # 指定の柿木図面から手合割を逆算する
      def guess_preset_info(str, options = {})
        create_by_shape(str).preset_info(options)
      end

      def create_by_shape(str)
        new.tap { |e| e.placement_from_shape(str) }
      end

      def create_by_human(str)
        new.tap { |e| e.placement_from_human(str) }
      end

      def create_by_preset(key)
        new.tap { |e| e.placement_from_preset(key) }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bioshogi-0.0.15 lib/bioshogi/board.rb
bioshogi-0.0.14 lib/bioshogi/board.rb
bioshogi-0.0.10 lib/bioshogi/board.rb
bioshogi-0.0.9 lib/bioshogi/board.rb
bioshogi-0.0.8 lib/bioshogi/board.rb
bioshogi-0.0.7 lib/bioshogi/board.rb
bioshogi-0.0.5 lib/bioshogi/board.rb
bioshogi-0.0.4 lib/bioshogi/board.rb
bioshogi-0.0.3 lib/bioshogi/board.rb