projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename getOppCol into static GetOppCol + start thinking about problems page
[vchess.git]
/
public
/
javascripts
/
variants
/
Marseille.js
diff --git
a/public/javascripts/variants/Marseille.js
b/public/javascripts/variants/Marseille.js
index
f372698
..
1adb83f
100644
(file)
--- a/
public/javascripts/variants/Marseille.js
+++ b/
public/javascripts/variants/Marseille.js
@@
-117,7
+117,7
@@
class MarseilleRules extends ChessRules
});
if (epSqs.length == 0)
return moves;
});
if (epSqs.length == 0)
return moves;
- const oppCol =
this.g
etOppCol(color);
+ const oppCol =
V.G
etOppCol(color);
for (let sq of epSqs)
{
if (this.subTurn == 1 || (epSqs.length == 2 &&
for (let sq of epSqs)
{
if (this.subTurn == 1 || (epSqs.length == 2 &&
@@
-161,9
+161,9
@@
class MarseilleRules extends ChessRules
this.epSquares.push([epSq]);
}
// Does this move give check on subturn 1? If yes, skip subturn 2
this.epSquares.push([epSq]);
}
// Does this move give check on subturn 1? If yes, skip subturn 2
- else if (this.subTurn==1 && this.underCheck(
this.g
etOppCol(this.turn)))
+ else if (this.subTurn==1 && this.underCheck(
V.G
etOppCol(this.turn)))
{
{
- this.turn =
this.g
etOppCol(this.turn);
+ this.turn =
V.G
etOppCol(this.turn);
this.epSquares.push([epSq]);
move.checkOnSubturn1 = true;
}
this.epSquares.push([epSq]);
move.checkOnSubturn1 = true;
}
@@
-171,7
+171,7
@@
class MarseilleRules extends ChessRules
{
if (this.subTurn == 2)
{
{
if (this.subTurn == 2)
{
- this.turn =
this.g
etOppCol(this.turn);
+ this.turn =
V.G
etOppCol(this.turn);
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.push(epSq);
}
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.push(epSq);
}
@@
-196,7
+196,7
@@
class MarseilleRules extends ChessRules
}
else if (move.checkOnSubturn1)
{
}
else if (move.checkOnSubturn1)
{
- this.turn =
this.g
etOppCol(this.turn);
+ this.turn =
V.G
etOppCol(this.turn);
this.subTurn = 1;
this.epSquares.pop();
}
this.subTurn = 1;
this.epSquares.pop();
}
@@
-204,7
+204,7
@@
class MarseilleRules extends ChessRules
{
if (this.subTurn == 1)
{
{
if (this.subTurn == 1)
{
- this.turn =
this.g
etOppCol(this.turn);
+ this.turn =
V.G
etOppCol(this.turn);
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.pop();
}
let lastEpsq = this.epSquares[this.epSquares.length-1];
lastEpsq.pop();
}
@@
-239,7
+239,7
@@
class MarseilleRules extends ChessRules
const maxeval = V.INFINITY;
const color = this.turn;
const maxeval = V.INFINITY;
const color = this.turn;
- const oppCol =
this.g
etOppCol(this.turn);
+ const oppCol =
V.G
etOppCol(this.turn);
// Search best (half) move for opponent turn
const getBestMoveEval = () => {
// Search best (half) move for opponent turn
const getBestMoveEval = () => {