projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Advance on Checkered. TODO: fix checks detection by checkered pieces
[xogo.git]
/
variants
/
Chakart
/
class.js
diff --git
a/variants/Chakart/class.js
b/variants/Chakart/class.js
index
4c55220
..
6ddc37c
100644
(file)
--- a/
variants/Chakart/class.js
+++ b/
variants/Chakart/class.js
@@
-220,7
+220,7
@@
export default class ChakartRules extends ChessRules {
moves = this.getDropMovesFrom([x, y]);
else if (this.egg == "kingboo") {
const color = this.turn;
moves = this.getDropMovesFrom([x, y]);
else if (this.egg == "kingboo") {
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
// Only allow to swap (non-immobilized!) pieces
for (let i=0; i<this.size.x; i++) {
for (let j=0; j<this.size.y; j++) {
// Only allow to swap (non-immobilized!) pieces
for (let i=0; i<this.size.x; i++) {
for (let j=0; j<this.size.y; j++) {
@@
-282,7
+282,7
@@
export default class ChakartRules extends ChessRules {
getPawnMovesFrom([x, y]) {
const color = this.turn;
getPawnMovesFrom([x, y]) {
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
const shiftX = (color == 'w' ? -1 : 1);
const firstRank = (color == "w" ? this.size.x - 1 : 0);
let moves = [];
const shiftX = (color == 'w' ? -1 : 1);
const firstRank = (color == "w" ? this.size.x - 1 : 0);
let moves = [];
@@
-392,7
+392,7
@@
export default class ChakartRules extends ChessRules {
play(move) {
const color = this.turn;
play(move) {
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
this.egg = move.egg;
if (move.egg == "toadette") {
this.reserve = { w: {}, b: {} };
this.egg = move.egg;
if (move.egg == "toadette") {
this.reserve = { w: {}, b: {} };
@@
-478,7
+478,7
@@
export default class ChakartRules extends ChessRules {
)
) {
// "Forgotten" promotion, which occurred after some effect
)
) {
// "Forgotten" promotion, which occurred after some effect
- let moves = super.pawnPostProcess([move], color, C.GetOpp
Col
(color));
+ let moves = super.pawnPostProcess([move], color, C.GetOpp
Turn
(color));
super.showChoices(moves, r);
}
else
super.showChoices(moves, r);
}
else
@@
-589,8
+589,8
@@
export default class ChakartRules extends ChessRules {
case "luigi":
case "waluigi":
// Change color of friendly or enemy piece, king excepted
case "luigi":
case "waluigi":
// Change color of friendly or enemy piece, king excepted
- const oldColor = (move.egg == "waluigi" ? color : C.GetOpp
Col
(color));
- const newColor = C.GetOpp
Col
(oldColor);
+ const oldColor = (move.egg == "waluigi" ? color : C.GetOpp
Turn
(color));
+ const newColor = C.GetOpp
Turn
(oldColor);
const coords = getRandomPiece(oldColor);
if (coords) {
const piece = this.getPiece(coords[0], coords[1]);
const coords = getRandomPiece(oldColor);
if (coords) {
const piece = this.getPiece(coords[0], coords[1]);