projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaner fen generation + first draft of Apocalypse + a few fixes
[xogo.git]
/
variants
/
_Antiking
/
class.js
diff --git
a/variants/_Antiking/class.js
b/variants/_Antiking/class.js
index
8e2173a
..
941bd82
100644
(file)
--- a/
variants/_Antiking/class.js
+++ b/
variants/_Antiking/class.js
@@
-55,9
+55,11
@@
export default class AbstractAntikingRules extends ChessRules {
m.vanish.length == 1 || m.vanish[1].p != 'a');
}
m.vanish.length == 1 || m.vanish[1].p != 'a');
}
- underCheck(squares, color) {
+ underCheck(square
_
s, color) {
let res = false;
let res = false;
- squares.forEach(sq => {
+ if (!Array.isArray(square_s[0]))
+ square_s = [square_s];
+ square_s.forEach(sq => {
switch (this.getPiece(sq[0], sq[1])) {
case 'k':
res ||= super.underAttack(sq, color);
switch (this.getPiece(sq[0], sq[1])) {
case 'k':
res ||= super.underAttack(sq, color);