projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Parachute, allow 3 squares in Ball variant
[vchess.git]
/
client
/
src
/
variants
/
Racingkings.js
diff --git
a/client/src/variants/Racingkings.js
b/client/src/variants/Racingkings.js
index
21d5c85
..
1145748
100644
(file)
--- a/
client/src/variants/Racingkings.js
+++ b/
client/src/variants/Racingkings.js
@@
-1,6
+1,6
@@
import { ChessRules } from "@/base_rules";
import { ChessRules } from "@/base_rules";
-export c
onst VariantRules = c
lass RacingkingsRules extends ChessRules {
+export class RacingkingsRules extends ChessRules {
static get HasFlags() {
return false;
}
static get HasFlags() {
return false;
}
@@
-44,7
+44,8
@@
export const VariantRules = class RacingkingsRules extends ChessRules {
// at next move, then it should be a draw:
if (color == "w" && this.kingPos['b'][0] == 1) {
// Search for a move
// at next move, then it should be a draw:
if (color == "w" && this.kingPos['b'][0] == 1) {
// Search for a move
- const oppKingMoves = this.getPotentialKingMoves(this.kingPos['b']);
+ const oppKingMoves = this.filterValid(
+ this.getPotentialKingMoves(this.kingPos['b']));
if (oppKingMoves.some(m => m.end.x == 0)) return "*";
}
return color == "w" ? "1-0" : "0-1";
if (oppKingMoves.some(m => m.end.x == 0)) return "*";
}
return color == "w" ? "1-0" : "0-1";