lib/stockfish/analysis_parser.rb in stockfish-0.3.0 vs lib/stockfish/analysis_parser.rb in stockfish-0.3.1
- old
+ new
@@ -66,10 +66,10 @@
variation = {
:score => score,
:sequence => sequence[:moves].split(/\s+/),
:depth => analysis[:depth].to_i,
}
- variation[:multipv] = analysis[:multipv].to_i if analysis[:multipv]
+ variation[:multipv] = analysis[:multipv] ? analysis[:multipv].to_i : 1
variation
end
def handle_singlepv
@raw_analysis.strip.split("\n").reverse.each do |row|