Skip to content

Commit

Permalink
Fix it skipping the first line
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayyy committed Oct 16, 2018
1 parent 5524f49 commit ebdbde2
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,17 +445,15 @@ public void readSchedule() throws IOException {

int lineNum = 0;
while ((line = br.readLine()) != null) {
if(lineNum > 0) {
String[] robots = line.split(",");

ArrayList<Integer> robotNumbers = new ArrayList<>();
String[] robots = line.split(",");

for (int s = 0; s < robots.length; s++) {
robotNumbers.add(Integer.parseInt(robots[s]));
}
ArrayList<Integer> robotNumbers = new ArrayList<>();

robotSchedule.add(robotNumbers);
for (int s = 0; s < robots.length; s++) {
robotNumbers.add(Integer.parseInt(robots[s]));
}

robotSchedule.add(robotNumbers);
lineNum ++;
}
br.close();
Expand Down

0 comments on commit ebdbde2

Please sign in to comment.