Class: Agentilda::Runner::Round

Inherits:
Data
  • Object
show all
Defined in:
lib/agentilda/runner.rb

Overview

One pass over the tree.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptsArray<Agentilda::Runner::Attempt> (readonly)

Returns:



51
52
53
54
55
56
57
# File 'lib/agentilda/runner.rb', line 51

Round = Data.define(:number, :attempts) do
  # @return [Integer]
  def advanced = attempts.count(&:advanced?)

  # @return [Boolean] nothing moved, so another identical round is pointless
  def dry? = advanced.zero?
end

#numberInteger (readonly)

Returns 1-based.

Returns:

  • (Integer)

    1-based



51
52
53
54
55
56
57
# File 'lib/agentilda/runner.rb', line 51

Round = Data.define(:number, :attempts) do
  # @return [Integer]
  def advanced = attempts.count(&:advanced?)

  # @return [Boolean] nothing moved, so another identical round is pointless
  def dry? = advanced.zero?
end

Instance Method Details

#advancedInteger

Returns:

  • (Integer)


53
# File 'lib/agentilda/runner.rb', line 53

def advanced = attempts.count(&:advanced?)

#dry?Boolean

Returns nothing moved, so another identical round is pointless.

Returns:

  • (Boolean)

    nothing moved, so another identical round is pointless



56
# File 'lib/agentilda/runner.rb', line 56

def dry? = advanced.zero?