Knight's tour: Difference between revisions

Line 3,520:
};
this.ctx = null;
this.step = Math.floor(this.width / this.cellCount);
this.lastTime = 0;
this.wait;
Line 3,537:
 
drawBoard() {
let a = false, xx, yy;
for (let y = 0; y < this.heightcellCount; y += this.step+) {
for (let x = 0; x < this.widthcellCount; x += this.step+) {
if (a) {
this.ctx.fillStyle = "#607db8";
Line 3,546:
}
a = !a;
this.ctx.fillRect(x,xx y,= x + this.step, y +* this.step);
yy = y * this.step;
this.ctx.fillRect(xx, yy, xx + this.step, yy + this.step);
}
if (!(this.cellCount & 1)) a = !a;
Line 3,786 ⟶ 3,788:
line-height: 16px;
}</pre>
 
 
===Functional===