Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Commit

Permalink
Fix #75.
Browse files Browse the repository at this point in the history
  • Loading branch information
dooglus committed Jun 18, 2015
1 parent c127282 commit c3bfdb5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/GameServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,12 @@ GameServer.prototype.updateMoveEngine = function() {
for (var j = 0; j < list.length ; j++) {
var check = list[j];

// Fix outer loop variables - we're deleting from this.nodesPlayer, so need to update its length, and maybe 'i' too
len--;
if (check.nodeId < cell.nodeId) {
i--;
// if we're deleting from this.nodesPlayer, fix outer loop variables; we need to update its length, and maybe 'i' too
if (check.cellType == 0) {
len--;
if (check.nodeId < cell.nodeId) {
i--;
}
}

// Consume effect
Expand Down

0 comments on commit c3bfdb5

Please sign in to comment.