projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix SuctionChess, draft HiddenRules (unfinished)
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
7e4057b
..
7949d7f
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-53,11
+53,6
@@
export const ChessRules = class ChessRules {
return "all";
}
return "all";
}
- // Path to pieces
- static getPpath(b) {
- return b; //usual pieces in pieces/ folder
- }
-
// Turn "wb" into "B" (for FEN)
static board2fen(b) {
return b[0] == "w" ? b[1].toUpperCase() : b[1];
// Turn "wb" into "B" (for FEN)
static board2fen(b) {
return b[0] == "w" ? b[1].toUpperCase() : b[1];
@@
-160,6
+155,11
@@
export const ChessRules = class ChessRules {
return V.CoordToColumn(coords.y) + (V.size.x - coords.x);
}
return V.CoordToColumn(coords.y) + (V.size.x - coords.x);
}
+ // Path to pieces
+ getPpath(b) {
+ return b; //usual pieces in pieces/ folder
+ }
+
// Aggregates flags into one object
aggregateFlags() {
return this.castleFlags;
// Aggregates flags into one object
aggregateFlags() {
return this.castleFlags;
@@
-379,7
+379,9
@@
export const ChessRules = class ChessRules {
// INITIALIZATION
constructor(fen) {
// INITIALIZATION
constructor(fen) {
- this.re_init(fen);
+ // In printDiagram() fen isn't supply because only getPpath() is used
+ if (fen)
+ this.re_init(fen);
}
// Fen string fully describes the game state
}
// Fen string fully describes the game state