import java.io.*; import java.util.*; public class Map { private Location[][] grid; public Point startingLoc; public Map(int x, int y) { grid = new Location[x][y]; } public Map(String landFile, String structFile, HashMap landMap, HashMap structMap) { try { int length, height, x, y; String str, loc; BufferedReader in = new BufferedReader(new FileReader(landFile)); str = in.readLine(); length = Integer.parseInt(str.substring(0, str.indexOf("x"))); height = Integer.parseInt(str.substring(str.indexOf("x")+1)); grid = new Location[length][height]; for(x=0; x0) return grid[0].length; else return 0; } }