Browse Source

Update Implementation Methode AIGridGUI

main
Thoumi Ngonga Brice 2 years ago
parent
commit
9251c50cb0
  1. 9
      src/main/java/BattleShip/AIGridGUI.java

9
src/main/java/BattleShip/AIGridGUI.java

@ -261,6 +261,15 @@ public class AIGridGUI extends JPanel {
} }
down.setCell(d); down.setCell(d);
down.setCount(downCount); down.setCount(downCount);
int r = f;
int rightCount = -1;
while(r >= 0 && cellsHit[r] && !cellsKilled[r]) {
r = moveRight(r);
rightCount++;
}
right.setCell(r);
right.setCount(rightCount);
} }
} }

Loading…
Cancel
Save