WIP
This commit is contained in:
@@ -158,17 +158,19 @@ class Board {
|
||||
}
|
||||
}
|
||||
|
||||
drawCoords(
|
||||
ctx,
|
||||
coords,
|
||||
this.squareSize,
|
||||
this.tiles,
|
||||
this.flipped,
|
||||
this.borderWidth,
|
||||
this.size,
|
||||
this.borderVisible,
|
||||
this.margin
|
||||
);
|
||||
if (this.borderVisible) {
|
||||
drawCoords(
|
||||
ctx,
|
||||
coords,
|
||||
this.squareSize,
|
||||
this.tiles,
|
||||
this.flipped,
|
||||
this.borderWidth,
|
||||
this.size,
|
||||
this.borderVisible,
|
||||
this.margin
|
||||
);
|
||||
}
|
||||
|
||||
this.background = canvas;
|
||||
}
|
||||
@@ -210,6 +212,20 @@ class Board {
|
||||
);
|
||||
}
|
||||
|
||||
if (!this.borderVisible) {
|
||||
drawCoords(
|
||||
this.tempCtx,
|
||||
this.style.coords,
|
||||
this.squareSize,
|
||||
this.tiles,
|
||||
this.flipped,
|
||||
this.borderWidth,
|
||||
this.size,
|
||||
this.borderVisible,
|
||||
this.margin
|
||||
);
|
||||
}
|
||||
|
||||
const piecesShadow = false;
|
||||
|
||||
await drawPieces(
|
||||
|
||||
@@ -55,18 +55,10 @@ const drawExtraInfo = async (
|
||||
const [resultWhite, resultBlack] = data.Result.split("-");
|
||||
|
||||
const textWhite =
|
||||
resultWhite === "0"
|
||||
? "Lost: 0"
|
||||
: resultWhite === "1"
|
||||
? "Won: 1"
|
||||
: "Draw: 1/2";
|
||||
resultWhite === "0" ? "Lost" : resultWhite === "1" ? "Won" : "Draw";
|
||||
|
||||
const textBlack =
|
||||
resultBlack === "0"
|
||||
? "Lost: 0"
|
||||
: resultBlack === "1"
|
||||
? "Won: 1"
|
||||
: "Draw: 1/2";
|
||||
resultBlack === "0" ? "Lost" : resultBlack === "1" ? "Won" : "Draw";
|
||||
|
||||
drawText(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user