projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename getOppCol into static GetOppCol + start thinking about problems page
[vchess.git]
/
public
/
javascripts
/
variants
/
Switching.js
diff --git
a/public/javascripts/variants/Switching.js
b/public/javascripts/variants/Switching.js
index
67078f5
..
d898ff6
100644
(file)
--- a/
public/javascripts/variants/Switching.js
+++ b/
public/javascripts/variants/Switching.js
@@
-57,7
+57,7
@@
class SwitchingRules extends ChessRules
const piece = this.getPiece(x,y);
const steps = V.steps[V.ROOK].concat(V.steps[V.BISHOP]);
const kp = this.kingPos[color];
const piece = this.getPiece(x,y);
const steps = V.steps[V.ROOK].concat(V.steps[V.BISHOP]);
const kp = this.kingPos[color];
- const oppCol =
this.g
etOppCol(color);
+ const oppCol =
V.G
etOppCol(color);
for (let step of steps)
{
let [i,j] = [x+step[0],y+step[1]];
for (let step of steps)
{
let [i,j] = [x+step[0],y+step[1]];
@@
-81,7
+81,7
@@
class SwitchingRules extends ChessRules
getAllValidMoves(computer)
{
const color = this.turn;
getAllValidMoves(computer)
{
const color = this.turn;
- const oppCol =
this.g
etOppCol(color);
+ const oppCol =
V.G
etOppCol(color);
let potentialMoves = [];
for (let i=0; i<V.size.x; i++)
{
let potentialMoves = [];
for (let i=0; i<V.size.x; i++)
{