diff --git a/README.md b/README.md index ef1f41d..06c3fc6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Installation for windows users Installation for linux users ---------------------------- +* This assumed you have a working Python 3.6+ installation, use pip3/python3 etc. if your default is python 2. * pip install kivy * Change the `engine.command` field in `config.json` to your kata v1.3+ binary. * Start the app by running `python katrain.py` diff --git a/controller.py b/controller.py index 4cd2f61..161fd61 100644 --- a/controller.py +++ b/controller.py @@ -168,7 +168,7 @@ class EngineControls(GridLayout): def _do_analyze_sgf(self, sgf): self._do_init(self.board_size) - sgfmoves = re.findall(r"([BW])\[([a-z]{2})\]", sgf) + sgfmoves = re.findall(r"\b([BW])\[([a-z]{2})\]", sgf) moves = [Move(player=Move.PLAYERS.index(p.upper()), sgfcoords=(mv, self.board_size)) for p, mv in sgfmoves] for move in moves: self.play(move, faster=(self.ai_fast.active and move != moves[-1])) diff --git a/katrain.py b/katrain.py index 166ccff..c05d7a0 100644 --- a/katrain.py +++ b/katrain.py @@ -54,6 +54,9 @@ class BadukPanWidget(Widget): stones_here = [m for m in self.engine.board.stones if m.coords == (xp, yp)] if stones_here and max(yd, xd) < self.grid_size / 2: # load old comment self.engine.info.text = stones_here[-1].comment(sgf=True) + if self.engine.debug: + print("\nAnalysis:\n", stones_here[-1].analysis) + print("\nParent Analysis:\n", stones_here[-1].parent.analysis) self.ghost_stone = None self.redraw() # remove ghost