projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Titan
[vchess.git]
/
client
/
src
/
variants
/
Recycle.js
diff --git
a/client/src/variants/Recycle.js
b/client/src/variants/Recycle.js
index
d23a78c
..
4afae21
100644
(file)
--- a/
client/src/variants/Recycle.js
+++ b/
client/src/variants/Recycle.js
@@
-2,6
+2,7
@@
import { ChessRules, PiPo, Move } from "@/base_rules";
import { ArrayFun } from "@/utils/array";
export class RecycleRules extends ChessRules {
import { ArrayFun } from "@/utils/array";
export class RecycleRules extends ChessRules {
+
static get PawnSpecs() {
return Object.assign(
{},
static get PawnSpecs() {
return Object.assign(
{},
@@
-85,6
+86,14
@@
export class RecycleRules extends ChessRules {
return this.board[i][j].charAt(1);
}
return this.board[i][j].charAt(1);
}
+ getPPpath(m) {
+ if (m.vanish.length == 2 && m.appear.length == 2) {
+ // Castle: show castle symbol
+ return "Coregal/castle";
+ }
+ return super.getPPpath(m);
+ }
+
// Used by the interface:
getReservePpath(index, color) {
return color + V.RESERVE_PIECES[index];
// Used by the interface:
getReservePpath(index, color) {
return color + V.RESERVE_PIECES[index];
@@
-227,4
+236,5
@@
export class RecycleRules extends ChessRules {
move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : "";
return piece + "@" + V.CoordsToSquare(move.end);
}
move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : "";
return piece + "@" + V.CoordsToSquare(move.end);
}
+
};
};