mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Fix
This commit is contained in:
@@ -139,7 +139,7 @@ module.exports = class ChessCommand extends Command {
|
||||
const prevGamePiece = prevPieces ? prevPieces[`${cols[col]}${row}`] : null;
|
||||
if (piece) {
|
||||
const parsed = this.pickImage(piece);
|
||||
if (prevPieces && !prevGamePiece) {
|
||||
if (prevPieces && (!prevGamePiece || piece !== prevGamePiece)) {
|
||||
drawImageWithTint(ctx, this.images[parsed.color][parsed.name], 'green', w, h, 52, 52);
|
||||
} else {
|
||||
ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52);
|
||||
|
||||
Reference in New Issue
Block a user