public Grid(String name) {
		mapName = name;
		String fileName = new File("").getAbsolutePath() + "\\readIn\\"
				+ mapName + ".txt";
		try {
			FileReader file = new FileReader(fileName);
			Scanner in = new Scanner(file);
			gridX = in.nextInt();
			gridY = in.nextInt();
			in.nextLine();
			textGrid = new char[gridX][gridY];
			tiles = new Tile[gridX][gridY];
			String temp = "";
			for (int a = 0; a < gridY && in.hasNext(); a++) {
				temp = in.next();
				for (int c = 0; c < gridX; c++) {
					textGrid[c][a] = temp.charAt(c);
				}
				temp = "";
			}
			in.close();
		}
		catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		setMap();
		try {

			tileSheetBig = ImageIO.read(new File("sprites/tiles.png"));

		}
		catch (IOException e) {
			e.printStackTrace();
		}

		tileSheet = new BufferedImage[tileRows * tileCols];

		for (int i = 0; i < tileCols; i++) {
			for (int j = 0; j < tileRows; j++) {
				tileSheet[i * tileRows + j] = tileSheetBig.getSubimage(i
						* tileWidth, j * tileHeight, tileWidth, tileHeight);
			}
		}
	}