+ static get Options() {
+ return {
+ select: [
+ {
+ label: "Randomness",
+ variable: "randomness",
+ defaut: 2,
+ options: [
+ { label: "Deterministic", value: 0 },
+ { label: "Symmetric random", value: 1 },
+ { label: "Asymmetric random", value: 2 }
+ ]
+ }
+ ],
+ check: []
+ };
+ }
+
+ static AbbreviateOptions(opts) {
+ return "";
+ // Randomness is a special option: (TODO?)
+ //return "R" + opts.randomness;
+ }
+
+ // Some variants don't have flags:
+ static get HasFlags() {
+ return true;
+ }
+
+ // Or castle
+ static get HasCastle() {
+ return V.HasFlags;
+ }
+
+ // Pawns specifications
+ static get PawnSpecs() {
+ return {
+ directions: { 'w': -1, 'b': 1 },
+ initShift: { w: 1, b: 1 },
+ twoSquares: true,
+ threeSquares: false,
+ promotions: [V.ROOK, V.KNIGHT, V.BISHOP, V.QUEEN],
+ canCapture: true,
+ captureBackward: false,
+ bidirectional: false
+ };
+ }
+
+ // En-passant captures need a stack of squares:
+ static get HasEnpassant() {
+ return true;
+ }
+
+ // Some variants cannot have analyse mode
+ static get CanAnalyze() {
+ return true;
+ }
+ // Patch: issues with javascript OOP, objects can't access static fields.
+ get canAnalyze() {
+ return V.CanAnalyze;
+ }
+
+ // Some variants show incomplete information,
+ // and thus show only a partial moves list or no list at all.
+ static get ShowMoves() {
+ return "all";
+ }
+ get showMoves() {
+ return V.ShowMoves;
+ }
+
+ // Sometimes moves must remain hidden until game ends
+ static get SomeHiddenMoves() {
+ return false;
+ }
+ get someHiddenMoves() {
+ return V.SomeHiddenMoves;
+ }