projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some fixes, add basic preview logic for new problem
[vchess.git]
/
public
/
javascripts
/
base_rules.js
diff --git
a/public/javascripts/base_rules.js
b/public/javascripts/base_rules.js
index
ae0800c
..
7f27e85
100644
(file)
--- a/
public/javascripts/base_rules.js
+++ b/
public/javascripts/base_rules.js
@@
-273,7
+273,7
@@
class ChessRules
turn: fenParts[1],
};
let nextIdx = 2;
turn: fenParts[1],
};
let nextIdx = 2;
- if (V.
h
asFlags)
+ if (V.
H
asFlags)
Object.assign(res, {flags: fenParts[nextIdx++]});
if (V.HasEnpassant)
Object.assign(res, {enpassant: fenParts[nextIdx]});
Object.assign(res, {flags: fenParts[nextIdx++]});
if (V.HasEnpassant)
Object.assign(res, {enpassant: fenParts[nextIdx]});
@@
-307,7
+307,7
@@
class ChessRules
position += emptyCount;
emptyCount = 0;
}
position += emptyCount;
emptyCount = 0;
}
-
fe
n += V.board2fen(this.board[i][j]);
+
positio
n += V.board2fen(this.board[i][j]);
}
}
if (emptyCount > 0)
}
}
if (emptyCount > 0)
@@
-438,7
+438,7
@@
class ChessRules
// Set flags and enpassant:
const parsedFen = V.ParseFen(fen);
if (V.HasFlags)
// Set flags and enpassant:
const parsedFen = V.ParseFen(fen);
if (V.HasFlags)
- this.setFlags(
fenParsed
.flags);
+ this.setFlags(
parsedFen
.flags);
if (V.HasEnpassant)
{
const epSq = parsedFen.enpassant != "-"
if (V.HasEnpassant)
{
const epSq = parsedFen.enpassant != "-"
@@
-1013,7
+1013,7
@@
class ChessRules
if (!!ingame)
{
// Hash of current game state *after move*, to detect repetitions
if (!!ingame)
{
// Hash of current game state *after move*, to detect repetitions
- move.hash = hex_md5(this.getFen();
+ move.hash = hex_md5(this.getFen()
)
;
}
}
}
}