projects
/
vchess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb6ceef
)
Final fixes in variants
author
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 19 Dec 2018 21:46:19 +0000
(22:46 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Wed, 19 Dec 2018 21:46:19 +0000
(22:46 +0100)
public/javascripts/variants/Grand.js
patch
|
blob
|
blame
|
history
public/javascripts/variants/Loser.js
patch
|
blob
|
blame
|
history
public/javascripts/variants/Magnetic.js
patch
|
blob
|
blame
|
history
views/rules/Magnetic.pug
patch
|
blob
|
blame
|
history
diff --git
a/public/javascripts/variants/Grand.js
b/public/javascripts/variants/Grand.js
index
22b2494
..
12fbfdb
100644
(file)
--- a/
public/javascripts/variants/Grand.js
+++ b/
public/javascripts/variants/Grand.js
@@
-27,11
+27,6
@@
class GrandRules extends ChessRules
);
}
);
}
- static GenRandInitFen()
- {
- return ChessRules.GenRandInitFen() + " 0000000000";
- }
-
getFen()
{
return super.getFen() + " " + this.getCapturedFen();
getFen()
{
return super.getFen() + " " + this.getCapturedFen();
@@
-363,7
+358,7
@@
class GrandRules extends ChessRules
return pieces["b"].join("") +
"/pppppppppp/10/10/10/10/10/10/PPPPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
return pieces["b"].join("") +
"/pppppppppp/10/10/10/10/10/10/PPPPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
- " w 1111 -";
+ " w 1111 -
0000000000
";
}
}
}
}
diff --git
a/public/javascripts/variants/Loser.js
b/public/javascripts/variants/Loser.js
index
6731d32
..
407c6aa
100644
(file)
--- a/
public/javascripts/variants/Loser.js
+++ b/
public/javascripts/variants/Loser.js
@@
-2,16
+2,6
@@
class LoserRules extends ChessRules
{
static get HasFlags() { return false; }
{
static get HasFlags() { return false; }
- setOtherVariables(fen)
- {
- const parsedFen = V.ParseFen(fen);
- const epSq = parsedFen.enpassant != "-"
- ? V.SquareToCoords(parsedFen.enpassant)
- : undefined;
- this.epSquares = [ epSq ];
- this.scanKingsRooks(fen);
- }
-
getPotentialPawnMoves([x,y])
{
let moves = super.getPotentialPawnMoves([x,y]);
getPotentialPawnMoves([x,y])
{
let moves = super.getPotentialPawnMoves([x,y]);
diff --git
a/public/javascripts/variants/Magnetic.js
b/public/javascripts/variants/Magnetic.js
index
6682b27
..
c4995dd
100644
(file)
--- a/
public/javascripts/variants/Magnetic.js
+++ b/
public/javascripts/variants/Magnetic.js
@@
-2,14
+2,6
@@
class MagneticRules extends ChessRules
{
static get HasEnpassant() { return false; }
{
static get HasEnpassant() { return false; }
- setOtherVariables(fen)
- {
- // No en-passant:
- const parsedFen = V.ParseFen(fen);
- this.setFlags(fenParsed.flags);
- this.scanKingsRooks(fen);
- }
-
getPotentialMovesFrom([x,y])
{
let standardMoves = super.getPotentialMovesFrom([x,y]);
getPotentialMovesFrom([x,y])
{
let standardMoves = super.getPotentialMovesFrom([x,y]);
diff --git
a/views/rules/Magnetic.pug
b/views/rules/Magnetic.pug
index
a86ebae
..
20b5fe0
100644
(file)
--- a/
views/rules/Magnetic.pug
+++ b/
views/rules/Magnetic.pug
@@
-33,6
+33,8
@@
p.
change anything on the board. They also block magnetic actions which go in
their direction.
change anything on the board. They also block magnetic actions which go in
their direction.
+p Castling is possible, but no en-passant captures.
+
h3 End of the game
p Win by capturing opponent's king. There is no notion of check or stalemate here.
h3 End of the game
p Win by capturing opponent's king. There is no notion of check or stalemate here.