public void writeMap() {
		try {
			PrintStream out = new PrintStream(level);
			out.println("" + width + "  " + height);

			for (int h = 0; h < map.length; h++) {
				for (int w = 0; w < map[0].length; w++) {
					if (charX / Cell.CELL_WIDTH == w && charX / Cell.CELL_HEIGHT == h) out.print("10  ");
					if (map[h][w] != null) out.print("1   ");
					else
						out.print("0   ");
				}
				out.println();
			}
			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

		changeLevelOrder();
	}