readme, PW[] fix

This commit is contained in:
Sander Land committed 2020-02-14 17:56:34 +01:00
1 parent c5542cf034
commit 24f8deab8b
3 files changed
+5 -1

No files matched your search

+1
View File
@@ -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`
+1 -1
View File
@@ -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]))
+3
View File
@@ -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