cleaner children/undo view and show regardless of eval

This commit is contained in:
Sander Land committed 2020-02-22 23:51:57 +01:00
1 parent eba8cddda1
commit b8cfbddd15
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -17,8 +17,8 @@
"stones": [ [0.05, 0.05, 0.05], [0.95, 0.95, 0.95] ],
"ghost_alpha": 0.5,
"eval_colors": [[0.537, 0.129, 0.42], [1, 0, 0], [1, 0.95, 0], [0.117, 0.588, 0]],
"undo_circle_col": [0.88,0.02,0.17,0.5],
"undo_alpha": 0.5,
"undo_alpha": 0.5,
"undo_scale": 0.95,
"eval_knots": [0, 0.5, 0.875, 1],
"eval_bounds": [1,12],
"board_margin": 1.5,
+4 -4
View File
@@ -148,15 +148,15 @@ class BadukPanWidget(Widget):
Rectangle(pos=(self.gridpos[x] - rsz / 2, self.gridpos[y] - rsz / 2), size=(rsz, rsz))
ix = ix + 1
# undos
# children of current moves in undo / review
undo_coords = set()
alpha = Config.get("ui")["undo_alpha"]
for m in last_move.children:
eval_info = m.evaluation_info
if eval_info[0] and m.coords[0] is not None:
if m.coords[0] is not None:
undo_coords.add(m.coords)
evalcol = (*self._eval_spectrum(eval_info[0]), alpha)
self.draw_stone(m.coords[0], m.coords[1], (*COLORS[m.player][:3], alpha), Config.get("ui")["undo_circle_col"], evalcol, self.EVAL_BOUNDS[1])
evalcol = (*self._eval_spectrum(eval_info[0]), alpha) if eval_info[0] else None
self.draw_stone(m.coords[0], m.coords[1], (*COLORS[m.player][:3], alpha), None, evalcol, self.EVAL_BOUNDS[1], scale=Config.get("ui").get("undo_scale", 0.95))
# hints
if self.engine.hints.active(current_player):