projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check variants. All OK except Dark (bug), Checkered (missing internal moves stack...
[vchess.git]
/
client
/
src
/
variants
/
Marseille.js
diff --git
a/client/src/variants/Marseille.js
b/client/src/variants/Marseille.js
index
2d4ecfa
..
0439ab4
100644
(file)
--- a/
client/src/variants/Marseille.js
+++ b/
client/src/variants/Marseille.js
@@
-205,6
+205,7
@@
class MarseilleRules extends ChessRules
};
}
};
}
+ // TODO: this is wrong: revise following base_rules.getComputerMove()
// No alpha-beta here, just adapted min-max at depth 2(+1)
getComputerMove()
{
// No alpha-beta here, just adapted min-max at depth 2(+1)
getComputerMove()
{
@@
-221,7
+222,7
@@
class MarseilleRules extends ChessRules
let moves = this.getAllValidMoves();
if (moves.length == 0)
{
let moves = this.getAllValidMoves();
if (moves.length == 0)
{
- const score = this.
checkGameEnd
();
+ const score = this.
getCurrentScore
();
if (score == "1/2")
return 0;
return maxeval * (score == "1-0" ? 1 : -1);
if (score == "1/2")
return 0;
return maxeval * (score == "1-0" ? 1 : -1);
@@
-234,7
+235,7
@@
class MarseilleRules extends ChessRules
// Otherwise it's color,1. In both cases the next test makes sense
if (!this.atLeastOneMove())
{
// Otherwise it's color,1. In both cases the next test makes sense
if (!this.atLeastOneMove())
{
- const score = this.
checkGameEnd
();
+ const score = this.
getCurrentScore
();
if (score == "1/2")
res = (oppCol == "w" ? Math.max(res, 0) : Math.min(res, 0));
else
if (score == "1/2")
res = (oppCol == "w" ? Math.max(res, 0) : Math.min(res, 0));
else