projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Advance on Checkered. TODO: fix checks detection by checkered pieces
[xogo.git]
/
variants
/
Baroque
/
class.js
diff --git
a/variants/Baroque/class.js
b/variants/Baroque/class.js
index
f87d768
..
6434e05
100644
(file)
--- a/
variants/Baroque/class.js
+++ b/
variants/Baroque/class.js
@@
-34,7
+34,12
@@
export default class BaroqueRules extends AbstractSpecialCaptureRules {
genRandInitBaseFen() {
const s = FenUtil.setupPieces(
genRandInitBaseFen() {
const s = FenUtil.setupPieces(
- ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'i'], {diffCol: ['b']});
+ ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'i'],
+ {
+ randomness: this.options["randomness"],
+ diffCol: ['b']
+ }
+ );
if (this.options["randomness"] <= 1) {
// Fix immobilizers/rooks pattern
const toExchange1 = s.w.indexOf('r'),
if (this.options["randomness"] <= 1) {
// Fix immobilizers/rooks pattern
const toExchange1 = s.w.indexOf('r'),
@@
-94,7
+99,7
@@
export default class BaroqueRules extends AbstractSpecialCaptureRules {
isImmobilized([x, y]) {
const piece = this.getPiece(x, y);
const color = this.getColor(x, y);
isImmobilized([x, y]) {
const piece = this.getPiece(x, y);
const color = this.getColor(x, y);
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
const adjacentSteps = this.pieces()['k'].moves[0].steps;
for (let step of adjacentSteps) {
const [i, j] = [x + step[0], this.getY(y + step[1])];
const adjacentSteps = this.pieces()['k'].moves[0].steps;
for (let step of adjacentSteps) {
const [i, j] = [x + step[0], this.getY(y + step[1])];