projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo
[vchess.git]
/
client
/
src
/
variants
/
Makruk.js
diff --git
a/client/src/variants/Makruk.js
b/client/src/variants/Makruk.js
index
c7dd343
..
75fb1da
100644
(file)
--- a/
client/src/variants/Makruk.js
+++ b/
client/src/variants/Makruk.js
@@
-16,6
+16,10
@@
export class MakrukRules extends ChessRules {
return true;
}
return true;
}
+ static get Notoodark() {
+ return true;
+ }
+
static get PawnSpecs() {
return Object.assign(
{},
static get PawnSpecs() {
return Object.assign(
{},
@@
-105,6
+109,12
@@
export class MakrukRules extends ChessRules {
);
}
);
}
+ isAttacked(sq, color) {
+ return (
+ super.isAttacked(sq, color) || this.isAttackedByPromoted(sq, color)
+ );
+ }
+
isAttackedByBishop(sq, color) {
const forward = (color == 'w' ? 1 : -1);
return this.isAttackedBySlideNJump(
isAttackedByBishop(sq, color) {
const forward = (color == 'w' ? 1 : -1);
return this.isAttackedBySlideNJump(
@@
-126,6
+136,16
@@
export class MakrukRules extends ChessRules {
);
}
);
}
+ isAttackedByPromoted(sq, color) {
+ return super.isAttackedBySlideNJump(
+ sq,
+ color,
+ V.PROMOTED,
+ V.steps[V.BISHOP],
+ "oneStep"
+ );
+ }
+
static get VALUES() {
return {
p: 1,
static get VALUES() {
return {
p: 1,