xdecor: fix chess bug?

This commit is contained in:
Sergei Mozhaisky 2020-05-19 09:05:22 +00:00
parent 4a4a48e554
commit 5e4f772139
2 changed files with 1484 additions and 1 deletions

View File

@ -635,7 +635,7 @@ local function get_moves_list(meta, pieceFrom, pieceTo, pieceTo_s, from_idx, to_
local to_x, to_y = index_to_xy(to_idx) local to_x, to_y = index_to_xy(to_idx)
local moves = meta:get_string("moves") local moves = meta:get_string("moves")
local pieceFrom_s = pieceFrom:match(":(%w+_%w+)") local pieceFrom_s = pieceFrom:match(":(%w+_%w+)")
local pieceFrom_si_id = pieces_str:match("(%d+)=" .. pieceFrom_s) local pieceFrom_si_id = pieceFrom_s ~= "" and pieces_str:match("(%d+)=" .. pieceFrom_s) or ""
local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=" .. pieceTo_s) or "" local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=" .. pieceTo_s) or ""
local coordFrom = letters[from_x + 1] .. math.abs(from_y - 8) local coordFrom = letters[from_x + 1] .. math.abs(from_y - 8)

1483
xdecor/src/chess.lua.ORIG Normal file

File diff suppressed because it is too large Load Diff