# coding: utf-8

atari = ["100円","100円","100円","100円","100円","100円","","100円","100円","100円","200円","200円","200円","500円","500円","1000円"]
otetudai = ["さらあらい","ふろあらい","さらふき","そうじき","ゆかふき","ごみすて","たなふき","といれそうじ"]
surotto = ["1","1","1","2","3","3","3","4"]
point = 0
puts "お手伝いお疲れ様でした!"
puts "何をしたか記入してください"
puts "1,さらあらい/2ふろあらい,/3,さらふき/4,そうじき/5,ゆかふき/6ごみすて,/7,たなふき/8,といれそうじ"
print ("内容を数字で記入してください:")
naiyou = gets.chomp.to_i
puts "ポイント換算します..."
sleep(1)
if naiyou = otetudai
else
  puts "その選択肢はないよ!!"
end

sleep(1)
if naiyou > 0
  puts "ガチャを引きましょう!"
  sleep(1)
  while true
    gatya = rand(15)
    print("ガチャ抽選中")
    sleep(0.25)
    print(".")
    sleep(0.25)
    print(".")
    sleep(0.25)
    print(".")
    sleep(0.25)
    print(".")
    printf("%sが当たりました!!\n", atari[gatya])
    point -= 1
    if naiyou <= 0
      break
    else
      next
    end 
  end
else
end

puts "またお手伝いをしてね!"
