private void carregaMapa() throws IOException {
		URL url = getClass().getClassLoader().getResource("niveis/nivel.txt");
		BufferedReader in = new BufferedReader(new InputStreamReader(
				url.openStream()));

		String linha;

		int z = 0;
		while ((linha = in.readLine()) != null) {
			if (linha.length() != 7) {
				in.close();
				throw new RuntimeException("Cada linha tem que ter 7 elementos");
			}
			for (int x = 0; x < 7; x++) {
				char c = linha.charAt(x);
				char[] ch = { 'g', 'a', 'c' };
				for (int i = 0; i < ch.length; i++) {
					double xl = x - 3, zl = -z;
					if (ch[i] == c) {

						TransformGroup tg = null;
						switch (c) {
						case 'a':
							tg = criaArvore();
							break;
						case 'c':
							tg = criaCaixa();
							break;
						case 'g':
							tg = criaGrelha();
							break;
						default:
							break;
						}
						Obstaculo obstaculo = new Obstaculo(bg, tg, xl, zl - 10);
						obstaculos.add(obstaculo);
						break;
					}
				}
			}
			z++;
		}
		in.close();
	}