projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
After refactoring. Seems more or less ok
[xogo.git]
/
variants
/
Giveaway
/
class.js
diff --git
a/variants/Giveaway/class.js
b/variants/Giveaway/class.js
index
15a8998
..
3f27e5f
100644
(file)
--- a/
variants/Giveaway/class.js
+++ b/
variants/Giveaway/class.js
@@
-42,7
+42,7
@@
export default class GiveawayRules extends ChessRules {
let fen = "";
if (this.options["randomness"] == 0)
let fen = "";
if (this.options["randomness"] == 0)
- fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
w 0
";
+ fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR";
else {
let pieces = { w: new Array(8), b: new Array(8) };
for (let c of ["w", "b"]) {
else {
let pieces = { w: new Array(8), b: new Array(8) };
for (let c of ["w", "b"]) {
@@
-69,8
+69,7
@@
export default class GiveawayRules extends ChessRules {
fen = (
pieces["b"].join("") +
"/pppppppp/8/8/8/8/PPPPPPPP/" +
fen = (
pieces["b"].join("") +
"/pppppppp/8/8/8/8/PPPPPPPP/" +
- pieces["w"].join("").toUpperCase() +
- " w 0"
+ pieces["w"].join("").toUpperCase()
);
}
return { fen: fen, o: {} };
);
}
return { fen: fen, o: {} };
@@
-81,10
+80,10
@@
export default class GiveawayRules extends ChessRules {
super(o);
}
super(o);
}
- underCheck(square, oppCol) {
+ underCheck(square
_s
, oppCol) {
if (this.options["mode"] == "suicide")
return false;
if (this.options["mode"] == "suicide")
return false;
- return super.underCheck(square, oppCol);
+ return super.underCheck(square
_s
, oppCol);
}
getCurrentScore() {
}
getCurrentScore() {