Method: Assumption::Game#initialize

Defined in:
lib/assumption/game.rb

#initialize(year) ⇒ Game

Returns a new instance of Game.



16
17
18
19
20
21
22
23
24
25
# File 'lib/assumption/game.rb', line 16

def initialize(year)
  @year = year
  @chart_data_set = Assumption::ChartDataSet.find_or_create_by_year(year)
  @level = 1
  @@all << self
  @current_song = @chart_data_set.random
  @next_song = @chart_data_set.random
  @input = nil
  start_level
end