Skip to content

Commit

Permalink
Fix possible crash on the final turn in Triples
Browse files Browse the repository at this point in the history
  • Loading branch information
Marty-D committed Jul 22, 2016
1 parent 111993e commit 13197e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion battle-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,7 @@ Battle = (() => {
actives.push(this.sides[i].active[j]);
}
}
if (!this.isAdjacent(actives[0], actives[1])) {
if (actives.length > 1 && !this.isAdjacent(actives[0], actives[1])) {
this.swapPosition(actives[0], 1, '[silent]');
this.swapPosition(actives[1], 1, '[silent]');
this.add('-center');
Expand Down

0 comments on commit 13197e8

Please sign in to comment.