this.checkFlags = { w: 0, b: 0 };
const flags = fenflags.substr(4); //skip first 4 digits, for castle
for (let c of ["w", "b"]) {
- this.checkFlags[c] = parseInt(flags.charAt(c == "w" ? 0 : 1));
+ this.checkFlags[c] = parseInt(flags.charAt(c == "w" ? 0 : 1), 10);
}
}
}
getPpath(b) {
- // TODO: !!this.checkFlags condition for printDiagram, but clearly not good.
+ // TODO: !!this.checkFlags condition for printDiagram, but it's not good.
// This is just a temporary fix.
if (b[1] == 'k' && !!this.checkFlags && this.checkFlags[b[0]] > 0)
return "Threechecks/" + b[0] + 'k_' + this.checkFlags[b[0]];