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

Commit

Permalink
Test of needs of update game method + complete Dickson's name
Browse files Browse the repository at this point in the history
  • Loading branch information
yichunShen committed Jun 18, 2018
1 parent be0ec6c commit 6e721d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion User1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ null
null
110
0
2003967
2060424
5 1
12
3444
Expand Down
2 changes: 1 addition & 1 deletion User2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dicks
Dickson
null
null
null
Expand Down
2 changes: 1 addition & 1 deletion src/system.java
Original file line number Diff line number Diff line change
Expand Up @@ -697,14 +697,14 @@ static void AIcheck(boolean isNotFirst) {
}
x = Integer.parseInt(input.substring(1, input.length())) - 1;
y = ((int) input.charAt(0)) - 65;// ASCII value for A~J = 65~74
System.out.println("check " + round + " " + x + " " + y);
if (x == 1) {// Get second digit, could be 10
try {
if (Integer.parseInt(input.substring(2, 3)) == 0)
x = 9;
} catch (Exception e) {
}
}
System.out.println("check " + round + " " + x + " " + y);
// Check for hit or miss on home grid
userShot = Battleship.homeGrid[y][x];
if (userShot.shipType == null) {// Miss
Expand Down
2 changes: 1 addition & 1 deletion usersRecord.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Please enter a username
Dicks
Dickson

0 comments on commit 6e721d1

Please sign in to comment.