projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Almost added TitanChess + EvolutionChess
[vchess.git]
/
client
/
src
/
variants
/
Knightrelay1.js
diff --git
a/client/src/variants/Knightrelay1.js
b/client/src/variants/Knightrelay1.js
index
1d1ab52
..
1e7bfab
100644
(file)
--- a/
client/src/variants/Knightrelay1.js
+++ b/
client/src/variants/Knightrelay1.js
@@
-1,10
+1,13
@@
import { ChessRules } from "@/base_rules";
export class Knightrelay1Rules extends ChessRules {
import { ChessRules } from "@/base_rules";
export class Knightrelay1Rules extends ChessRules {
+
static get HasEnpassant() {
return false;
}
static get HasEnpassant() {
return false;
}
+ // TODO: IsGoodPosition to check that 2 knights are on the board...
+
getPotentialMovesFrom([x, y]) {
let moves = super.getPotentialMovesFrom([x, y]);
getPotentialMovesFrom([x, y]) {
let moves = super.getPotentialMovesFrom([x, y]);
@@
-97,7
+100,7
@@
export class Knightrelay1Rules extends ChessRules {
return {
p: 1,
r: 5,
return {
p: 1,
r: 5,
- n:
7, //the knight is valuable
+ n:
0, //the knight isn't captured - value doesn't matter
b: 3,
q: 9,
k: 1000
b: 3,
q: 9,
k: 1000
@@
-118,7
+121,8
@@
export class Knightrelay1Rules extends ChessRules {
const finalSquare = V.CoordsToSquare(move.end);
const piece = this.getPiece(move.start.x, move.start.y);
const finalSquare = V.CoordsToSquare(move.end);
const piece = this.getPiece(move.start.x, move.start.y);
- // Since pieces and pawns could move like knight, indicate start and end squares
+ // Since pieces and pawns could move like knight,
+ // indicate start and end squares
let notation =
piece.toUpperCase() +
initSquare +
let notation =
piece.toUpperCase() +
initSquare +
@@
-136,4
+140,5
@@
export class Knightrelay1Rules extends ChessRules {
return notation;
}
return notation;
}
+
};
};