projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix non-augmenting self absorptions
[vchess.git]
/
client
/
src
/
variants
/
Circular.js
diff --git
a/client/src/variants/Circular.js
b/client/src/variants/Circular.js
index
d1f8230
..
4775844
100644
(file)
--- a/
client/src/variants/Circular.js
+++ b/
client/src/variants/Circular.js
@@
-3,6
+3,7
@@
import { ArrayFun } from "@/utils/array";
import { shuffle } from "@/utils/alea";
export class CircularRules extends ChessRules {
import { shuffle } from "@/utils/alea";
export class CircularRules extends ChessRules {
+
static get HasCastle() {
return false;
}
static get HasCastle() {
return false;
}
@@
-55,8
+56,10
@@
export class CircularRules extends ChessRules {
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
if (rem2 == positions[1] % 2) {
// Fix bishops (on different colors)
for (let i=2; i<8; i++) {
- if (positions[i] % 2 != rem2)
+ if (positions[i] % 2 != rem2)
{
[positions[1], positions[i]] = [positions[i], positions[1]];
[positions[1], positions[i]] = [positions[i], positions[1]];
+ break;
+ }
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
}
}
for (let i = 0; i < 8; i++) pieces[c][positions[i]] = composition[i];
@@
-221,4
+224,5
@@
export class CircularRules extends ChessRules {
static get SEARCH_DEPTH() {
return 2;
}
static get SEARCH_DEPTH() {
return 2;
}
+
};
};