ancient chinese+black
This commit is contained in:
1 parent
edd2c160c7
commit
282f492c4a
5 files changed
+8
-36
No files matched your search
@@ -434,11 +434,7 @@ class Game:
|
||||
base_game_name = f"{PROGRAM_NAME}_{player_names['B']} vs {player_names['W']}"
|
||||
return f"{base_game_name} {self.game_id}.sgf"
|
||||
|
||||
def write_sgf(
|
||||
self,
|
||||
filename: str,
|
||||
trainer_config: Optional[Dict] = None,
|
||||
):
|
||||
def write_sgf(self, filename: str, trainer_config: Optional[Dict] = None):
|
||||
if trainer_config is None:
|
||||
trainer_config = self.katrain.config("trainer", {})
|
||||
save_feedback = trainer_config.get("save_feedback", False)
|
||||
@@ -585,10 +581,7 @@ class Game:
|
||||
analyze_and_play_policy(new_node)
|
||||
|
||||
self.engines[node.next_player].request_analysis(
|
||||
new_node,
|
||||
callback=set_analysis,
|
||||
priority=-1000,
|
||||
analyze_fast=True,
|
||||
new_node, callback=set_analysis, priority=-1000, analyze_fast=True
|
||||
)
|
||||
|
||||
analyze_and_play_policy(cn)
|
||||
|
||||
@@ -8,10 +8,10 @@ from typing import Dict, List, Optional, Tuple
|
||||
from katrain.core.constants import (
|
||||
ANALYSIS_FORMAT_VERSION,
|
||||
PROGRAM_NAME,
|
||||
REPORT_DT,
|
||||
SGF_INTERNAL_COMMENTS_MARKER,
|
||||
SGF_SEPARATOR_MARKER,
|
||||
VERSION,
|
||||
REPORT_DT,
|
||||
VERSION
|
||||
)
|
||||
from katrain.core.lang import i18n
|
||||
from katrain.core.sgf_parser import Move, SGFNode
|
||||
@@ -319,13 +319,7 @@ class GameNode(SGFNode):
|
||||
text += i18n._("Info:point loss").format(points_lost=points_lost) + "\n"
|
||||
top_move = previous_top_move["move"]
|
||||
score = self.format_score(previous_top_move["scoreLead"])
|
||||
text += (
|
||||
i18n._("Info:top move").format(
|
||||
top_move=top_move,
|
||||
score=score,
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
text += i18n._("Info:top move").format(top_move=top_move, score=score) + "\n"
|
||||
else:
|
||||
text += i18n._("Info:best move") + "\n"
|
||||
if previous_top_move.get("pv") and (sgf or details):
|
||||
|
||||
@@ -471,14 +471,7 @@ class BadukPanWidget(Widget):
|
||||
)
|
||||
if move_policy == best_move_policy:
|
||||
Color(*Theme.TOP_MOVE_BORDER_COLOR[:3], Theme.POLICY_ALPHA)
|
||||
Line(
|
||||
circle=(
|
||||
self.gridpos_x[x],
|
||||
self.gridpos_y[y],
|
||||
self.stone_size - dp(1.2),
|
||||
),
|
||||
width=dp(2),
|
||||
)
|
||||
Line(circle=(self.gridpos_x[x], self.gridpos_y[y], self.stone_size - dp(1.2)), width=dp(2))
|
||||
|
||||
with pass_btn.canvas.after:
|
||||
move_policy = policy[-1]
|
||||
|
||||
@@ -663,11 +663,7 @@ def cached_text_texture(text, font_name, markup, _cache={}, **kwargs):
|
||||
|
||||
def draw_text(pos, text, font_name=None, markup=False, **kwargs):
|
||||
texture = cached_text_texture(text, font_name, markup, **kwargs)
|
||||
Rectangle(
|
||||
texture=texture,
|
||||
pos=(pos[0] - texture.size[0] / 2, pos[1] - texture.size[1] / 2),
|
||||
size=texture.size,
|
||||
)
|
||||
Rectangle(texture=texture, pos=(pos[0] - texture.size[0] / 2, pos[1] - texture.size[1] / 2), size=texture.size)
|
||||
|
||||
|
||||
def draw_circle(pos, r, col):
|
||||
|
||||
@@ -71,11 +71,7 @@ class ProgressLoader(BoxLayout):
|
||||
Clock.schedule_once(self.animation_show, 1)
|
||||
|
||||
def animation_show(self, _dt):
|
||||
animation = Animation(
|
||||
opacity=1,
|
||||
d=0.2,
|
||||
t="out_quad",
|
||||
)
|
||||
animation = Animation(opacity=1, d=0.2, t="out_quad")
|
||||
animation.start(self)
|
||||
|
||||
def request_download_file(self, url, path):
|
||||
|
||||
Reference in new issue
Block a user