projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unambiguous section in the PGN + some fixes + code formatting and fix typos
[vchess.git]
/
client
/
src
/
variants
/
Grasshopper.js
diff --git
a/client/src/variants/Grasshopper.js
b/client/src/variants/Grasshopper.js
index
ec52d9b
..
fb8c27c
100644
(file)
--- a/
client/src/variants/Grasshopper.js
+++ b/
client/src/variants/Grasshopper.js
@@
-2,11
+2,22
@@
import { ChessRules } from "@/base_rules";
import { ArrayFun } from "@/utils/array";
import { randInt } from "@/utils/alea";
import { ArrayFun } from "@/utils/array";
import { randInt } from "@/utils/alea";
-export c
onst VariantRules = c
lass GrasshopperRules extends ChessRules {
+export class GrasshopperRules extends ChessRules {
static get HasEnpassant() {
return false;
}
static get HasEnpassant() {
return false;
}
+ static get PawnSpecs() {
+ return Object.assign(
+ {},
+ ChessRules.PawnSpecs,
+ {
+ twoSquares: false,
+ promotions: ChessRules.PawnSpecs.promotions.concat([V.GRASSHOPPER])
+ }
+ );
+ }
+
static get GRASSHOPPER() {
return "g";
}
static get GRASSHOPPER() {
return "g";
}