projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cosmetics
[vchess.git]
/
client
/
src
/
variants
/
Atomic.js
diff --git
a/client/src/variants/Atomic.js
b/client/src/variants/Atomic.js
index
35def3f
..
fdc665d
100644
(file)
--- a/
client/src/variants/Atomic.js
+++ b/
client/src/variants/Atomic.js
@@
-1,6
+1,13
@@
import { ChessRules, PiPo } from "@/base_rules";
export const VariantRules = class AtomicRules extends ChessRules {
import { ChessRules, PiPo } from "@/base_rules";
export const VariantRules = class AtomicRules extends ChessRules {
+ getEpSquare(moveOrSquare) {
+ if (typeof moveOrSquare !== "object" || moveOrSquare.appear.length > 0)
+ return super.getEpSquare(moveOrSquare);
+ // Capturing move: no en-passant
+ return undefined;
+ }
+
getPotentialMovesFrom([x, y]) {
let moves = super.getPotentialMovesFrom([x, y]);
getPotentialMovesFrom([x, y]) {
let moves = super.getPotentialMovesFrom([x, y]);