Skip to content

Commit

Permalink
Bug fix in HCMM when new cell is not selected
Browse files Browse the repository at this point in the history
  • Loading branch information
raduciobanu committed Jun 8, 2018
1 parent c6dcaa0 commit 4985833
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mobemu/utils/HCMM.java
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,14 @@ protected void move() {
}
}

if (selectedGoalCellX == 0) {
selectedGoalCellX = previousGoalCellX;
}

if (selectedGoalCellY == 0) {
selectedGoalCellY = previousGoalCellX;
}

// re-definition of the number of hosts in each cell
cells[previousGoalCellX - 1][previousGoalCellY - 1].numberOfHosts--;
cells[selectedGoalCellX - 1][selectedGoalCellY - 1].numberOfHosts++;
Expand Down

0 comments on commit 4985833

Please sign in to comment.