+ get pawnPromotions() {
+ // TODO: lancer orientation = backward vertical from promotion square?
+ return ['q', 'r', 'n', 'b', 'j', 's', 'l'];
+ }
+
// lorient : "{z1:NO,z2:SE, ...etc}"
setOtherVariables(fenParsed) {
super.setOtherVariables(fenParsed);
this.lancer_orient = JSON.parse(fenParsed.lorient);
}
// lorient : "{z1:NO,z2:SE, ...etc}"
setOtherVariables(fenParsed) {
super.setOtherVariables(fenParsed);
this.lancer_orient = JSON.parse(fenParsed.lorient);
}
- //TODO: from here
-
- static ParseFen(fen) {
- const fenParts = fen.split(" ");
- return Object.assign(
- ChessRules.ParseFen(fen),
- { sentrypush: fenParts[5] }
+ getPartFen(o) {
+ return Object.assign({},
+ super.getPartFen(o),
+ {
+ "lorient": o.init ? "TODO" : this.getLorientFen(),
+ "sentrypush": o.init ? "-" : this.getSentrypushFen()
+ }
setOtherVariables(fen) {
super.setOtherVariables(fen);
// subTurn == 2 only when a sentry moved, and is about to push something
setOtherVariables(fen) {
super.setOtherVariables(fen);
// subTurn == 2 only when a sentry moved, and is about to push something
return super.canTake([x1, y1], [x2, y2]);
}
return super.canTake([x1, y1], [x2, y2]);
}
// Is piece on square (x,y) immobilized?
isImmobilized([x, y]) {
const color = this.getColor(x, y);
// Is piece on square (x,y) immobilized?
isImmobilized([x, y]) {
const color = this.getColor(x, y);