mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-09 01:04:16 +02:00
Fix
This commit is contained in:
@@ -129,9 +129,10 @@ module.exports = class ChessCommand extends Command {
|
|||||||
let col = 0;
|
let col = 0;
|
||||||
for (let i = 0; i < 64; i++) {
|
for (let i = 0; i < 64; i++) {
|
||||||
const piece = gameState.pieces[`${cols[col]}${row}`];
|
const piece = gameState.pieces[`${cols[col]}${row}`];
|
||||||
if (!piece) continue;
|
if (piece) {
|
||||||
const parsed = this.pickImage(piece);
|
const parsed = this.pickImage(piece);
|
||||||
ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52);
|
ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52);
|
||||||
|
}
|
||||||
w += 52 + 2;
|
w += 52 + 2;
|
||||||
col += 1;
|
col += 1;
|
||||||
if (col % 8 === 0 && col !== 0) {
|
if (col % 8 === 0 && col !== 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user