Sha256: dee5ac6afdd800873411c807b8a457c9b4ed46c5c098a3762656225d650485b9

Contents?: true

Size: 358 Bytes

Versions: 10

Compression:

Stored size: 358 Bytes

Contents

require 'forwardable'

module JustGo

  # = Chain
  #
  # A collection of Points with stones of the same chain id
  class Chain
    extend Forwardable

    def initialize(points: [])
      @points = points
    end

    attr_reader :points

    def_delegator :points, :include?

    def player_number
      points.first.stone.player_number
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
just_go-0.1.10 lib/just_go/chain.rb
just_go-0.1.9 lib/just_go/chain.rb
just_go-0.1.8 lib/just_go/chain.rb
just_go-0.1.7 lib/just_go/chain.rb
just_go-0.1.6 lib/just_go/chain.rb
just_go-0.1.5 lib/just_go/chain.rb
just_go-0.1.4 lib/just_go/chain.rb
just_go-0.1.3 lib/just_go/chain.rb
just_go-0.1.2 lib/just_go/chain.rb
just_go-0.1.0 lib/just_go/chain.rb