Because SG-1 has more episodes it will now get a higher chance of being selected
This commit is contained in:
parent
dfae73757b
commit
9ef22bca77
2 changed files with 11 additions and 2 deletions
|
@ -10,7 +10,17 @@ require './stargaterando-data'
|
|||
module StargateRando::Controllers
|
||||
class Index < R '/'
|
||||
def get
|
||||
chosen_series_id = Data::SERIES_SHORT_NAMES[rand(3)]
|
||||
series_selector = 1 + rand(17)
|
||||
p series_selector
|
||||
case series_selector
|
||||
when 1..10
|
||||
chosen_series_id = 'SG-1'
|
||||
when 11..15
|
||||
chosen_series_id = 'SGA'
|
||||
else
|
||||
chosen_series_id = 'SGU'
|
||||
end
|
||||
|
||||
@series = Data::SERIES_NAMES[chosen_series_id]
|
||||
num_seasons = Data::SEASONS_PER_SERIES[chosen_series_id]
|
||||
chosen_season = 1 + rand(num_seasons)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue