projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typos
[vchess.git]
/
client
/
src
/
variants
/
Pacosako.js
diff --git
a/client/src/variants/Pacosako.js
b/client/src/variants/Pacosako.js
index
d4908a5
..
b5f703f
100644
(file)
--- a/
client/src/variants/Pacosako.js
+++ b/
client/src/variants/Pacosako.js
@@
-716,11
+716,19
@@
export class PacosakoRules extends ChessRules {
if (!m.end.released) return true;
// Check for repetitions:
V.PlayOnBoard(this.board, m);
if (!m.end.released) return true;
// Check for repetitions:
V.PlayOnBoard(this.board, m);
- const newState = { piece: m.end.released, position: this.getBaseFen() };
+ const newState = {
+ piece: m.end.released,
+ square: { x: m.end.x, y: m.end.y },
+ position: this.getBaseFen()
+ };
const repet =
this.repetitions.some(r => {
return (
r.piece == newState.piece &&
const repet =
this.repetitions.some(r => {
return (
r.piece == newState.piece &&
+ (
+ r.square.x == newState.square.x &&
+ r.square.y == newState.square.y
+ ) &&
r.position == newState.position
);
});
r.position == newState.position
);
});
@@
-801,6
+809,7
@@
export class PacosakoRules extends ChessRules {
this.repetitions.push(
{
piece: move.end.released,
this.repetitions.push(
{
piece: move.end.released,
+ square: { x: move.end.x, y: move.end.y },
position: this.getBaseFen()
}
);
position: this.getBaseFen()
}
);