Sha256: 35567ee16bd51fdb84f2040c0c6ea7769c3b90b8a4237ffdb320fa2455a50715

Contents?: true

Size: 498 Bytes

Versions: 9

Compression:

Stored size: 498 Bytes

Contents

module Bioshogi
  module Board
    module TechniqueMatcherMethods
      # 180度回転した盤面を返す
      def flip
        self.class.new.tap do |board|
          surface.values.each do |e|
            board.place_on(e.flip)
          end
        end
      end

      # X軸のみを反転した盤面を返す
      def flop
        self.class.new.tap do |board|
          surface.values.each do |e|
            board.place_on(e.flop)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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