projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix capturing promotions in Absorption variant
[vchess.git]
/
client
/
src
/
variants
/
Rococo.js
diff --git
a/client/src/variants/Rococo.js
b/client/src/variants/Rococo.js
index
f075fe8
..
e6480a8
100644
(file)
--- a/
client/src/variants/Rococo.js
+++ b/
client/src/variants/Rococo.js
@@
-15,6
+15,15
@@
export class RococoRules extends ChessRules {
return ChessRules.PIECES.concat([V.IMMOBILIZER]);
}
return ChessRules.PIECES.concat([V.IMMOBILIZER]);
}
+ static get Lines() {
+ return [
+ [[1, 1], [1, 9]],
+ [[1, 9], [9, 9]],
+ [[9, 9], [9, 1]],
+ [[9, 1], [1, 1]]
+ ];
+ }
+
getPpath(b) {
if (b[1] == "m")
//'m' for Immobilizer (I is too similar to 1)
getPpath(b) {
if (b[1] == "m")
//'m' for Immobilizer (I is too similar to 1)
@@
-45,7
+54,7
@@
export class RococoRules extends ChessRules {
this.kingPos["w"] = [i, k];
break;
default: {
this.kingPos["w"] = [i, k];
break;
default: {
- const num = parseInt(position[i].charAt(j));
+ const num = parseInt(position[i].charAt(j)
, 10
);
if (!isNaN(num)) k += num - 1;
}
}
if (!isNaN(num)) k += num - 1;
}
}