From c8deccdf82b69f9c46807686a68874e2b95817d5 Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Sat, 30 Apr 2022 17:26:14 -0500 Subject: [PATCH] debug --- plugin/chess/draw.py | 4 ++-- plugin/chess/game.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugin/chess/draw.py b/plugin/chess/draw.py index 9876036..ff4120a 100644 --- a/plugin/chess/draw.py +++ b/plugin/chess/draw.py @@ -167,11 +167,11 @@ class Draw: self._graphics.text("You move:", 12, 2, 1) if src != None and dst == None: self._graphics.text("<" + src.upper() + "> - __", 12, 3, 1) - #self._cursor_clear([src], player_color) + self._cursor_clear([src], player_color) self._cursor(src, player_color) elif src != None and dst != None: self._graphics.text(src.upper() + " - <" + dst.upper() + ">", 12, 3, 1) - #self._cursor_clear([src, dst], player_color) + self._cursor_clear([src, dst], player_color) self._cursor(src, player_color) self._cursor(dst, player_color) #else: diff --git a/plugin/chess/game.py b/plugin/chess/game.py index f6c870a..a1cf97c 100644 --- a/plugin/chess/game.py +++ b/plugin/chess/game.py @@ -118,9 +118,8 @@ class ChessGame: # user picks source piece elif self._state == GameState.CHOOSE_SRC: - srces = self._get_sources() - if len(srces) > 0: - src = srces[self._src_idx] + if len(self._get_sources()) > 0: + src = self._get_sources()[self._src_idx] self._draw.draw_select(self._board, self._move, self._player_color, src) key = self._cinput.get_one_shot(0.1) else: