diff --git a/src/core.py b/src/core.py --- a/src/core.py +++ b/src/core.py @@ -47,8 +47,12 @@ class Core: self._imgIndex=(self._imgIndex+step)%len(self._imgs) imgPath=os.path.join(cfg.misc.imgDir,self._imgs[self._imgIndex]) self._frame=PIL.Image.open(imgPath) - self._guiMessages.send("setCurrentFrame",(self._frame.copy(),)) - self.analyze() + self._guiMessages.send("setCurrentFrame",(self._frame.copy(),gui.PREVIEW)) + self.preview() + + def preview(self): + if self.detector.analyze(self._frame): + self._guiMessages.send("setGameState", (self.detector.board,[])) def analyze(self): if self.detector.analyze(self._frame):