add n-puzzle in ruby.