projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed Checkered variant
[xogo.git]
/
variants
/
Ambiguous
/
class.js
diff --git
a/variants/Ambiguous/class.js
b/variants/Ambiguous/class.js
index
3043b7b
..
a0cb7f2
100644
(file)
--- a/
variants/Ambiguous/class.js
+++ b/
variants/Ambiguous/class.js
@@
-24,7
+24,12
@@
export default class AmbiguousRules extends ChessRules {
genRandInitBaseFen() {
const s = FenUtil.setupPieces(
genRandInitBaseFen() {
const s = FenUtil.setupPieces(
- ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'], {diffCol: ['b']});
+ ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'],
+ {
+ randomness: this.options["randomness"],
+ diffCol: ['b']
+ }
+ );
return {
fen: s.b.join("") + "/pppppppp/8/8/8/8/PPPPPPPP/" +
s.w.join("").toUpperCase(),
return {
fen: s.b.join("") + "/pppppppp/8/8/8/8/PPPPPPPP/" +
s.w.join("").toUpperCase(),
@@
-40,7
+45,7
@@
export default class AmbiguousRules extends ChessRules {
// Subturn 2: play a move for me (which just indicate a square).
getPotentialMovesFrom([x, y]) {
const color = this.turn;
// Subturn 2: play a move for me (which just indicate a square).
getPotentialMovesFrom([x, y]) {
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
if (this.subTurn == 2) {
// Just play a normal move (which in fact only indicate a square)
let movesHash = {};
if (this.subTurn == 2) {
// Just play a normal move (which in fact only indicate a square)
let movesHash = {};
@@
-156,7
+161,7
@@
export default class AmbiguousRules extends ChessRules {
getCurrentScore() {
// This function is only called at subTurn 1
getCurrentScore() {
// This function is only called at subTurn 1
- const color = C.GetOpp
Col
(this.turn);
+ const color = C.GetOpp
Turn
(this.turn);
if (this.searchKingPos(color).length == 0)
return (color == 'w' ? "0-1" : "1-0");
return "*";
if (this.searchKingPos(color).length == 0)
return (color == 'w' ? "0-1" : "1-0");
return "*";
@@
-165,7
+170,7
@@
export default class AmbiguousRules extends ChessRules {
postPlay(move) {
const color = this.turn;
if (this.subTurn == 2 || this.searchKingPos(color).length == 0) {
postPlay(move) {
const color = this.turn;
if (this.subTurn == 2 || this.searchKingPos(color).length == 0) {
- this.turn = C.GetOpp
Col
(color);
+ this.turn = C.GetOpp
Turn
(color);
this.movesCount++;
}
this.subTurn = 3 - this.subTurn;
this.movesCount++;
}
this.subTurn = 3 - this.subTurn;