projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Increment game stat counter also for rematch live games
[vchess.git]
/
client
/
src
/
variants
/
Diamond.js
diff --git
a/client/src/variants/Diamond.js
b/client/src/variants/Diamond.js
index
2a3869e
..
1aa9b0e
100644
(file)
--- a/
client/src/variants/Diamond.js
+++ b/
client/src/variants/Diamond.js
@@
-3,6
+3,7
@@
import { ArrayFun } from "@/utils/array";
import { shuffle } from "@/utils/alea";
export class DiamondRules extends ChessRules {
import { shuffle } from "@/utils/alea";
export class DiamondRules extends ChessRules {
+
static get HasFlags() {
return false;
}
static get HasFlags() {
return false;
}
@@
-27,8
+28,10
@@
export class DiamondRules 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];
@@
-136,4
+139,5
@@
export class DiamondRules extends ChessRules {
}
return super.getNotation(move); //all other pieces are orthodox
}
}
return super.getNotation(move); //all other pieces are orthodox
}
+
};
};