Top Level Namespace
Instance Method Summary collapse
Instance Method Details
#calculate_points(type, odds, points_completed, velocity, iterations) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'bin/risk_of_burns', line 13 def calculate_points(type, odds, points_completed, velocity, iterations) risk_factor = { :risky => { '10%' => 1, '50%' => 2, '90%' => 4 }, :rigorous => { '10%' => 1, '50%' => 1.4, '90%' => 1.8 } } points_completed + (velocity * iterations / risk_factor[type][odds]).floor end |