projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Wormhole1 + ranem Wormhole --> Wormhole2. Rename Selfabsorption (too long) into...
[vchess.git]
/
client
/
src
/
variants
/
Wormhole2.js
diff --git
a/client/src/variants/Wormhole.js
b/client/src/variants/Wormhole2.js
similarity index 98%
rename from
client/src/variants/Wormhole.js
rename to
client/src/variants/Wormhole2.js
index
05d8f2a
..
06b7fb6
100644
(file)
--- a/
client/src/variants/Wormhole.js
+++ b/
client/src/variants/Wormhole2.js
@@
-1,6
+1,6
@@
import { ChessRules } from "@/base_rules";
import { ChessRules } from "@/base_rules";
-export class WormholeRules extends ChessRules {
+export class Wormhole
2
Rules extends ChessRules {
static get HasFlags() {
return false;
static get HasFlags() {
return false;
@@
-150,7
+150,7
@@
export class WormholeRules extends ChessRules {
this.canTake([x, y], sq)
)
) {
this.canTake([x, y], sq)
)
) {
-
moves.push(this.getBasicMove([x, y], sq));
+ moves.push(this.getBasicMove([x, y], sq));
}
}
return moves;
}
}
return moves;
@@
-186,7
+186,7
@@
export class WormholeRules extends ChessRules {
this.canTake([x, y], [sq[0], sq[1]])
) {
const finalPieces = sq[0] == lastRank
this.canTake([x, y], [sq[0], sq[1]])
) {
const finalPieces = sq[0] == lastRank
- ?
[V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN]
+ ?
V.PawnSpecs.promotions
: [V.PAWN];
for (let piece of finalPieces) {
moves.push(
: [V.PAWN];
for (let piece of finalPieces) {
moves.push(