projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Dynamo FEN + computer play
[vchess.git]
/
client
/
src
/
base_rules.js
diff --git
a/client/src/base_rules.js
b/client/src/base_rules.js
index
1a4a32d
..
167be91
100644
(file)
--- a/
client/src/base_rules.js
+++ b/
client/src/base_rules.js
@@
-966,7
+966,7
@@
export const ChessRules = class ChessRules {
let potentialMoves = [];
for (let i = 0; i < V.size.x; i++) {
for (let j = 0; j < V.size.y; j++) {
let potentialMoves = [];
for (let i = 0; i < V.size.x; i++) {
for (let j = 0; j < V.size.y; j++) {
- if (this.getColor(i, j) == color) {
+ if (this.
board[i][j] != V.EMPTY && this.
getColor(i, j) == color) {
Array.prototype.push.apply(
potentialMoves,
this.getPotentialMovesFrom([i, j])
Array.prototype.push.apply(
potentialMoves,
this.getPotentialMovesFrom([i, j])