Sha256: 8992b73e3e93584d7e25235c1baa949a847307b69ef787914909c6af23c708e6
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 Bytes
Contents
require "shogi/format/csa/cell" require "shogi/format/usi/cell" module Shogi class Cell def self.register(name) send(:include, Format.const_get(name).const_get("Cell")) end self.register("CSA") self.register("USI") attr_reader :x, :y attr_accessor :piece attr_accessor :turn def initialize(x, y, piece=nil, turn=nil) @x = x @y = y @piece = piece @turn = turn end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
shogi-ruby-0.1.0 | lib/shogi/cell.rb |
shogi-ruby-0.0.9 | lib/shogi/cell.rb |
shogi-ruby-0.0.8 | lib/shogi/cell.rb |