projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Stealthbomb
[vchess.git]
/
client
/
src
/
variants
/
Schess.js
diff --git
a/client/src/variants/Schess.js
b/client/src/variants/Schess.js
index
9511898
..
d8e1b1c
100644
(file)
--- a/
client/src/variants/Schess.js
+++ b/
client/src/variants/Schess.js
@@
-1,6
+1,7
@@
import { ChessRules, PiPo } from "@/base_rules";
export class SchessRules extends ChessRules {
import { ChessRules, PiPo } from "@/base_rules";
export class SchessRules extends ChessRules {
+
static get PawnSpecs() {
return Object.assign(
{},
static get PawnSpecs() {
return Object.assign(
{},
@@
-341,7
+342,14
@@
export class SchessRules extends ChessRules {
const nothingAppear = (move.appear[0].p == V.NOTHING);
if (pPieceAppear || nothingAppear) {
let suffix = "";
const nothingAppear = (move.appear[0].p == V.NOTHING);
if (pPieceAppear || nothingAppear) {
let suffix = "";
- if (pPieceAppear) suffix = "/" + move.appear[0].p.toUpperCase();
+ if (pPieceAppear) {
+ suffix = "/" + move.appear[0].p.toUpperCase();
+ if (move.appear.length == 3) {
+ // Castling; indicate square
+ suffix +=
+ V.CoordsToSquare({ x: move.appear[0].x, y: move.appear[0].y });
+ }
+ }
let cmove = JSON.parse(JSON.stringify(move));
cmove.appear.shift();
return super.getNotation(cmove) + suffix;
let cmove = JSON.parse(JSON.stringify(move));
cmove.appear.shift();
return super.getNotation(cmove) + suffix;
@@
-349,4
+357,5
@@
export class SchessRules extends ChessRules {
}
return super.getNotation(move);
}
}
return super.getNotation(move);
}
+
};
};