経験値曲線追加
二次ベジェの成長曲線
LV→EXP

diff --git a/Gemfile b/Gemfile
index aff9677..8bde3bb 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,2 +1,6 @@
 source "https://rubygems.org"
 gem "tree_support", github: "akicho8/tree_support"
+gem "stylet",       github: "akicho8/stylet"
+gem "stylet_math",  github: "akicho8/stylet_math"
+gem "rain_table",   github: "akicho8/rain_table"
+gem "gnuplot"
diff --git a/_output_all.png b/_output_all.png
new file mode 100644
index 0000000..bb220b6
Binary files /dev/null and b/_output_all.png differ
diff --git a/成長曲線_二次ベジェ版.rb b/成長曲線_二次ベジェ版.rb
index 4e17dbb..4d83bc5 100644
--- a/成長曲線_二次ベジェ版.rb
+++ b/成長曲線_二次ベジェ版.rb
@@ -3,49 +3,18 @@
 # 成長曲線
 #

-$LOAD_PATH.unshift("~/src/rain_table/lib")
-$LOAD_PATH.unshift("~/src/stylet_math/lib")
-
-require "pp"
-require "gnuplot"
+require "bundler/setup"
 require "rain_table"
 require "stylet/vector"
+require "gnuplot"
+require "pp"

 Vec = Stylet::Vector

 class GrowthCurveRand
-  # def self.output_graph(graph_data)
-  #   Gnuplot.open do |gp|
-  #     Gnuplot::Plot.new(gp) do |plot|
-  #       plot.terminal "png font 'Ricty-Regular.ttf'"
-  #       plot.output "_output_#{name.downcase}.png"
-  #       plot.title  "Growth Curve"
-  #       plot.ylabel "ATK"
-  #       plot.data << Gnuplot::DataSet.new([graph_data.collect{|e|e[:level]}, graph_data.collect.collect{|e|e[:rate]}]) do |ds|
-  #         ds.with = "linespoints pointtype 7 pointsize 1"
-  #         ds.notitle
-  #       end
-  #     end
-  #   end
-  # end
-
-  # attr_accessor :max_level
-
-  # def initialize(max_level)
-  #   @max_level = max_level
-  # end
-
   def rate(max_level, level)
     rand
   end
-
-  # def graph_data
-  #   (0..@max_level).collect {|level| {:level => level, :rate => rate(level)} }
-  # end
-
-  def output_graph
-    self.class.output_graph(graph_data)
-  end
 end

 # レベルに比例
@@ -98,7 +67,7 @@ class GrowthCurve3 < GrowthCurve2
     m = 2.0*(a.to_f*(p1.x.to_f-p0.x.to_f)+b.to_f*(p1.y.to_f-p0.y.to_f))
     n = a.to_f*p0.x.to_f+b.to_f*p0.y.to_f+c.to_f
     d = (m.to_f**2)-4.0*l.to_f*n.to_f
-    t = []
+    t = [] # !> assigned but unused variable - id
     if d > 0
       s = Math.sqrt(d)
       t << (-m+s).to_f / (2.0*l)
@@ -107,7 +76,7 @@ class GrowthCurve3 < GrowthCurve2
       t << -m.to_f / (2.0*l)
     end

-    t.select{|t|(0.0..1.0).include?(t)} # !> assigned but unused variable - id
+    t.select{|t|(0.0..1.0).include?(t)} # !> shadowing outer local variable - t
   end

   # レベルをX座標を見なしてX軸に垂直な直線とベジェ曲線の交点のY座標
@@ -199,24 +168,6 @@ Gnuplot.open do |gp|
 end
 `open _output_all.png`

-# >> +-------+----------------+----------------+
-# >> | level | 垂直交点(早熟) | 垂直交点(普通) |
-# >> +-------+----------------+----------------+
-# >> |     0 |              0 |              0 |
-# >> |     1 |           2874 |           1000 |
-# >> |     2 |           4666 |           2000 |
-# >> |     3 |           5968 |           3000 |
-# >> |     4 |           6971 |           4000 |
-# >> |     5 |           7769 |           5000 |
-# >> |     6 |           8415 |           6000 |
-# >> |     7 |           8941 |           7000 |
-# >> |     8 |           9370 |           8000 |
-# >> |     9 |           9719 |           9000 |
-# >> |    10 |          10000 |          10000 |
-# >> +-------+----------------+----------------+
-# >> writing this to gnuplot:
-# >> set terminal png font 'Ricty-Regular.ttf'
-# >> set output "_output_all.png"
-# >> set title "Growth Curve"
-# >> set ylabel "atk"
-# >>
+# ~> /usr/local/var/rbenv/versions/2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:112:in `require': cannot load such file -- stylet_math (LoadError)
+# ~> 	from /usr/local/var/rbenv/versions/2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:112:in `require'
+# ~> 	from -:7:in `<main>'
diff --git a/経験値曲線_二次関数版.rb b/経験値曲線_二次関数版.rb
index a588d12..34a4659 100644
--- a/経験値曲線_二次関数版.rb
+++ b/経験値曲線_二次関数版.rb
@@ -12,6 +12,8 @@
 # x を求める場合は x = Math.sqrt(((exp-q).to_f / a).abs) + p に代入する
 #

+require "bundler/setup"
+
 require "rain_table"
 require "gnuplot"