Skip to content

Commit 64c8e75

Browse files
committed
fix winrate not corresponding to side
1 parent 3a78e28 commit 64c8e75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/gametree.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ export function getBoard(tree, id) {
359359
}
360360

361361
const visits = node.data.VISITS || null
362-
const winrate = (node.data.WINRATE && node.data.WINRATE * 100) || null
362+
const winrate =
363+
(node.data.WINRATE && (0.5 + sign * (node.data.WINRATE - 0.5)) * 100) ||
364+
null
363365
const scoreLead =
364366
(node.data.SCORELEAD && node.data.SCORELEAD * sign) || null
365367

0 commit comments

Comments
 (0)