projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Chaining variant
[xogo.git]
/
variants
/
Atomic
/
class.js
diff --git
a/variants/Atomic/class.js
b/variants/Atomic/class.js
index
b0662d3
..
4bd2712
100644
(file)
--- a/
variants/Atomic/class.js
+++ b/
variants/Atomic/class.js
@@
-7,18
+7,14
@@
export default class AtomicRules extends ChessRules {
static get Options() {
return {
select: C.Options.select,
static get Options() {
return {
select: C.Options.select,
-
check
: [
+
input
: [
{
label: "Balanced",
{
label: "Balanced",
- defaut: false,
- variable: "rempawn"
- },
- {
- label: "Falling pawn",
- defaut: false,
- variable: "pawnfall"
+ variable: "rempawn",
+ type: "checkbox",
+ defaut: false
}
}
- ],
+ ]
.concat(C.Options.input.filter(i => i.variable == "pawnfall"))
,
styles: C.Options.styles.filter(s => s != "atomic")
};
}
styles: C.Options.styles.filter(s => s != "atomic")
};
}
@@
-30,7
+26,7
@@
export default class AtomicRules extends ChessRules {
canIplay(x, y) {
if (this.options["rempawn"] && this.movesCount == 0)
canIplay(x, y) {
if (this.options["rempawn"] && this.movesCount == 0)
- return (this.
turn == side
&& this.getPiece(x, y) == "p");
+ return (this.
playerColor == this.turn
&& this.getPiece(x, y) == "p");
return super.canIplay(x, y);
}
return super.canIplay(x, y);
}
@@
-49,8
+45,8
@@
export default class AtomicRules extends ChessRules {
c: c
})
],
c: c
})
],
- start: {
x: x, y: y
},
- end: {
x: x, y: y
}
+ start: {
x: x, y: y
},
+ end: {
x: x, y: y
}
})
];
}
})
];
}