private Map<Integer, Image> splitImg(BufferedImage img, int numOfTilesOnSide) {
		Map<Integer, Image> map = new HashMap<Integer, Image>();

		int n = 1;
		for (int i = 0; i < numOfTilesOnSide; i++) {
			for (int j = 0; j < numOfTilesOnSide; j++) {
				if (i == (numOfTilesOnSide - 1) && j == (numOfTilesOnSide - 1)) {
					map.put(0, img.getSubimage(j * sideSize, i * sideSize,
							sideSize, sideSize));
				} else {
					map.put(n, img.getSubimage(j * sideSize, i * sideSize,
							sideSize, sideSize));
				}
				n++;
			}
		}
		return map;
	}