projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Berolina notation + Marseille PGN
[vchess.git]
/
public
/
javascripts
/
variants
/
Berolina.js
diff --git
a/public/javascripts/variants/Berolina.js
b/public/javascripts/variants/Berolina.js
index
be72e2d
..
8ea3c9c
100644
(file)
--- a/
public/javascripts/variants/Berolina.js
+++ b/
public/javascripts/variants/Berolina.js
@@
-119,14
+119,15
@@
class BerolinaRules extends ChessRules
if (piece == V.PAWN)
{
// Pawn move
if (piece == V.PAWN)
{
// Pawn move
+ const finalSquare = V.CoordsToSquare(move.end);
let notation = "";
if (move.vanish.length == 2) //capture
let notation = "";
if (move.vanish.length == 2) //capture
- notation = finalSquare;
+ notation =
"Px" +
finalSquare;
else
{
else
{
- // No capture
- const start
Column = V.CoordToColumn(move.start.y
);
- notation = start
Column + "x"
+ finalSquare;
+ // No capture
: indicate the initial square for potential ambiguity
+ const start
Square = V.CoordsToSquare(move.start
);
+ notation = start
Square
+ finalSquare;
}
if (move.appear[0].p != V.PAWN) //promotion
notation += "=" + move.appear[0].p.toUpperCase();
}
if (move.appear[0].p != V.PAWN) //promotion
notation += "=" + move.appear[0].p.toUpperCase();