samples/06_save_load/01_save_load_game/app/main.rb
# Sets the value of fire (whether it is dead or roaring), and the story line
Sets the value of fire (whether it is dead or roaring), and the story line
Sets the value of fire ( whether it is dead or roaring ) and the story line
def light_fire
    return unless fire_ready? 
    state.fire = :roaring 
    state.fire_progress = 0 
    if state.fire != state.previous_fire
      set_story_line "the fire is #{state.fire}." 
      state.previous_fire = state.fire
    end
  end
def light_fire return unless fire_ready? state . fire = :roaring state . fire_progress = 0 if state . fire != state . previous_fire set_story_line "the fire is #{state.fire}." state . previous_fire = state . fire end end
Sets the value of fire (whether it is dead or roaring), and the story line
Sets the value of fire ( whether it is dead or roaring ) and the story line
# returns unless the fire is ready to be lit # fire is lit, set to roaring # the fire progress returns to 0, since the fire has been lit # the story line is set using string interpolation