# coding: utf-8
#/usr/bin/env ruby
# -*- cobing: utf-8 -*-

puts"山形ゆるキャラ図鑑"
puts"地域を選んでください"
puts"1:村山"
puts"2:置賜"
puts"3:最上"
puts"4:庄内"

tiiki = gets.to_i

if tiiki == 1
  puts"市町村を選んでください"
  puts"1:山形市"
  puts"2:天童市"
  puts"3:東根市"
  puts"4:上山市"
  puts"5:尾花沢市"
  puts"6:大石田町"
  puts"7:村山市"
  puts"8;河北町"
  puts"9:中山町"
  puts"10:山辺町"
  puts"11:寒河江市"
  puts"12:西川町"
  puts"13:大江町"
  puts"14:朝日町"

  si = gets.to_i

  if si == 1
    puts"はながさべにちゃん"

    pid = spawn"display -geometry +2+2 benityan.jpg"
    sleep(5)
    Process.kill(:INT, pid)
  elsif si == 2
    puts"こま八"

    pid = spawn"display -geometry +2+2 komahati.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 3
    puts"タントくん"

    pid = spawn"display -geometry +2+2 tanto.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 4
    puts"かせ坊"

    pid = spawn"display -geometry +2+2 kasebou.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 5
    puts"ゆきごろう"

    pid = spawn"display -geometry +2+2 yukigorou.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 6
    puts"そばにーる"

    pid = spawn"display -geometry +2+2 sobani-ru.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 7
    puts"ムララ"

    pid = spawn"display -geometry +2+2 murara.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 8
    puts"べにのすけ"

    pid = spawn"display -geometry +2+2 beninosuke.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 9
    puts"かぶくん"

    pid = spawn"display -geometry +2+2 kabukun.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  elsif si == 10
    puts"すだまりんちゃん"
      pid = spawn"display -geometry +2+2 sudamarintyan.jpg"
    sleep(30)
    Process.kill(:INT, pid)
  end
end
