projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MarseilleRules OK
[vchess.git]
/
public
/
javascripts
/
variants
/
Marseille.js
diff --git
a/public/javascripts/variants/Marseille.js
b/public/javascripts/variants/Marseille.js
index
7ac928f
..
02daa22
100644
(file)
--- a/
public/javascripts/variants/Marseille.js
+++ b/
public/javascripts/variants/Marseille.js
@@
-230,6
+230,9
@@
class MarseilleRules extends ChessRules
// 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()
{
+ if (this.subTurn == 2)
+ return null; //TODO: imperfect interface setup
+
const maxeval = V.INFINITY;
const color = this.turn;
const oppCol = this.getOppCol(this.turn);
const maxeval = V.INFINITY;
const color = this.turn;
const oppCol = this.getOppCol(this.turn);
@@
-306,6
+309,7
@@
class MarseilleRules extends ChessRules
{
candidates.push(i);
}
{
candidates.push(i);
}
+
const selected = doubleMoves[_.sample(candidates, 1)].moves;
if (selected.length == 1)
return selected[0];
const selected = doubleMoves[_.sample(candidates, 1)].moves;
if (selected.length == 1)
return selected[0];