Something went wrong. Try again.
Something went wrong. Try again.
ners-roller base_test.rb
12345678910111213141516171819202122232425# frozen_string_literal: true
# Parent class for Tests# Child class constructors must define the 'roller' method to return# the dice roll class that they wish to use for the test.class BaseTest attr_reader :rolls, :timestamp, :check, :rating
def initialize(character, check) @timestamp = Time.now @rolls = [roller.new] @rolls << roller.new while @rolls.last.explode? @check = check @rating = character.rating(check) end
def spend_token false end
def roll_total @rolls.map(&:value).reduce(&:+) endend