projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo in Chakart getComputerMove()
[vchess.git]
/
client
/
src
/
variants
/
Perfect.js
diff --git
a/client/src/variants/Perfect.js
b/client/src/variants/Perfect.js
index
a0c75c5
..
4f65a0e
100644
(file)
--- a/
client/src/variants/Perfect.js
+++ b/
client/src/variants/Perfect.js
@@
-84,11
+84,12
@@
export class PerfectRules extends ChessRules {
isAttackedByAmazon(sq, color) {
return (
isAttackedByAmazon(sq, color) {
return (
- super.isAttackedByQueen(sq, color) ||
+ this.isAttackedBySlideNJump(sq, color, V.AMAZON, V.steps[V.BISHOP]) ||
+ this.isAttackedBySlideNJump(sq, color, V.AMAZON, V.steps[V.ROOK]) ||
this.isAttackedBySlideNJump(
sq,
color,
this.isAttackedBySlideNJump(
sq,
color,
- V.
MARSHALL
,
+ V.
AMAZON
,
V.steps[V.KNIGHT],
"oneStep"
)
V.steps[V.KNIGHT],
"oneStep"
)
@@
-97,11
+98,11
@@
export class PerfectRules extends ChessRules {
isAttackedByEmpress(sq, color) {
return (
isAttackedByEmpress(sq, color) {
return (
- this.isAttackedBySlideNJump(sq, color, V.
MARSHALL
, V.steps[V.ROOK]) ||
+ this.isAttackedBySlideNJump(sq, color, V.
EMPRESS
, V.steps[V.ROOK]) ||
this.isAttackedBySlideNJump(
sq,
color,
this.isAttackedBySlideNJump(
sq,
color,
- V.
MARSHALL
,
+ V.
EMPRESS
,
V.steps[V.KNIGHT],
"oneStep"
)
V.steps[V.KNIGHT],
"oneStep"
)
@@
-110,11
+111,11
@@
export class PerfectRules extends ChessRules {
isAttackedByPrincess(sq, color) {
return (
isAttackedByPrincess(sq, color) {
return (
- this.isAttackedBySlideNJump(sq, color, V.
CARDINAL
, V.steps[V.BISHOP]) ||
+ this.isAttackedBySlideNJump(sq, color, V.
PRINCESS
, V.steps[V.BISHOP]) ||
this.isAttackedBySlideNJump(
sq,
color,
this.isAttackedBySlideNJump(
sq,
color,
- V.
CARDINAL
,
+ V.
PRINCESS
,
V.steps[V.KNIGHT],
"oneStep"
)
V.steps[V.KNIGHT],
"oneStep"
)