projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A few bug fixes
[vchess.git]
/
client
/
src
/
variants
/
Convert.js
diff --git
a/client/src/variants/Convert.js
b/client/src/variants/Convert.js
index
74ffead
..
c501c02
100644
(file)
--- a/
client/src/variants/Convert.js
+++ b/
client/src/variants/Convert.js
@@
-13,10
+13,8
@@
export class ConvertRules extends ChessRules {
this.lastMoveEnd = [null];
}
this.lastMoveEnd = [null];
}
- static GenRandInitFen(randomness) {
- if (randomness == 0)
- return "rnbqkbnr/8/pppppppp/8/8/PPPPPPPP/8/RNBQKBNR w 0 ahah";
- const baseFen = ChessRules.GenRandInitFen(randomness);
+ static GenRandInitFen(options) {
+ const baseFen = ChessRules.GenRandInitFen(options);
return (
baseFen.substr(0, 8) +
"/8/pppppppp/8/8/PPPPPPPP/8/" +
return (
baseFen.substr(0, 8) +
"/8/pppppppp/8/8/PPPPPPPP/8/" +
@@
-263,7
+261,7
@@
export class ConvertRules extends ChessRules {
else break;
}
for (let i = mvArray.length - 1; i >= 0; i--) this.undo(mvArray[i]);
else break;
}
for (let i = mvArray.length - 1; i >= 0; i--) this.undo(mvArray[i]);
- if (!mv.end.
releas
ed) return (mvArray.length > 1 ? mvArray : mvArray[0]);
+ if (!mv.end.
convert
ed) return (mvArray.length > 1 ? mvArray : mvArray[0]);
}
return null; //never reached
}
}
return null; //never reached
}