Sha256: 4bcb65b193a3833e7a61b4f07f3bde0e912992ff9f5a9a8e9933371b8777ac00
Contents?: true
Size: 384 Bytes
Versions: 9
Compression:
Stored size: 384 Bytes
Contents
module Bioshogi class MainClock def initialize @single_clocks = Location.inject({}) { |a, e| a.merge(e => SingleClock.new) } @counter = 0 end def add(v) @single_clocks[Location[@counter]].add(v) @counter += 1 end def last_clock @single_clocks[Location[@counter.pred]] end def to_s last_clock.to_s end end end
Version data entries
9 entries across 9 versions & 1 rubygems