mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
Fix
This commit is contained in:
@@ -134,7 +134,7 @@ module.exports = class ChessCommand extends Command {
|
||||
const prevGamePiece = prevGameState ? prevGameState.pieces[`${cols[col]}${row}`] : null;
|
||||
if (piece) {
|
||||
const parsed = this.pickImage(piece);
|
||||
if (piece !== prevGamePiece) {
|
||||
if (prevGameState && 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