shogi-server source
Révision | 56ecfed66b8cc31240c6a1d0bfd6208e40bd69f6 (tree) |
---|---|
l'heure | 2020-04-28 21:34:33 |
Auteur | TadaoYamaoka <tadaoyamaoka@gmai...> |
Commiter | TadaoYamaoka |
mateが+のみの場合、評価値が正しく表示されないバグ修正
@@ -445,8 +445,8 @@ class BridgeState | ||
445 | 445 | if !@side |
446 | 446 | @cp *= -1 |
447 | 447 | end |
448 | - elsif /(\s+|^)score\s+mate\s+(-?\d+)/ =~ str | |
449 | - @cp = ($2.to_i < 0 ? -100000 : 100000) | |
448 | + elsif /(\s+|^)score\s+mate\s+(-?)/ =~ str | |
449 | + @cp = ($2 == "-" ? -100000 : 100000) | |
450 | 450 | if !@side |
451 | 451 | @cp *= -1 |
452 | 452 | end |