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

Commit

Permalink
Added stuff in AI
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymo111 committed Jun 18, 2018
1 parent 6b8a700 commit 395d2b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion User3
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ null
null
0
0
713167
1754657
0 0
1
0
Expand Down
4 changes: 2 additions & 2 deletions src/AI.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public AI(boolean inGui) throws IOException {
if (input.equalsIgnoreCase("y")) {
for (int i = 0; i < Battleship.enemyGrid.length; i++)
for (int j = 0; j < Battleship.enemyGrid[i].length; j++) {
if (Battleship.enemyGrid[i][j].x == 0 || Battleship.enemyGrid[i][j].x == 9) {// x in outer 2
if (Battleship.enemyGrid[i][j].x == 1 || Battleship.enemyGrid[i][j].x == 8) {// x in outer 2
Battleship.enemyGrid[i][j].huntPDx += 40;
Battleship.enemyGrid[i][j].combinehuntPDXY();
}
if (Battleship.enemyGrid[i][j].y == 0 || Battleship.enemyGrid[i][j].y == 9) {// y in outer 2
if (Battleship.enemyGrid[i][j].y == 1 || Battleship.enemyGrid[i][j].y == 8) {// y in outer 2
Battleship.enemyGrid[i][j].huntPDy += 40;
Battleship.enemyGrid[i][j].combinehuntPDXY();
}
Expand Down

0 comments on commit 395d2b3

Please sign in to comment.