projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix FenUtil.setupPieces and Antiking variants
[xogo.git]
/
base_rules.js
diff --git
a/base_rules.js
b/base_rules.js
index
d609a56
..
7dc134d
100644
(file)
--- a/
base_rules.js
+++ b/
base_rules.js
@@
-219,6
+219,7
@@
export default class ChessRules {
const s = FenUtil.setupPieces(
['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'],
{
const s = FenUtil.setupPieces(
['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'],
{
+ randomness: this.options["randomness"],
between: {p1: 'k', p2: 'r'},
diffCol: ['b'],
flags: ['r']
between: {p1: 'k', p2: 'r'},
diffCol: ['b'],
flags: ['r']
@@
-556,7
+557,7
@@
export default class ChessRules {
chessboard.style.top = spaceTop + "px";
// Give sizes instead of recomputing them,
// because chessboard might not be drawn yet.
chessboard.style.top = spaceTop + "px";
// Give sizes instead of recomputing them,
// because chessboard might not be drawn yet.
- this.setupPieces({
+ this.setup
Visual
Pieces({
width: cbWidth,
height: cbHeight,
x: spaceLeft,
width: cbWidth,
height: cbHeight,
x: spaceLeft,
@@
-596,7
+597,7
@@
export default class ChessRules {
return board;
}
return board;
}
- setupPieces(r) {
+ setup
Visual
Pieces(r) {
let chessboard =
document.getElementById(this.containerId).querySelector(".chessboard");
if (!r)
let chessboard =
document.getElementById(this.containerId).querySelector(".chessboard");
if (!r)