static void MapRead(String mapname) throws FileNotFoundException{
	
		// Reads a map from a file. File format:
		// x y (dimensions, 2 integers)
		//xxxxxxxxx
		//xooooxoox
		//xooxoooxx
		//xooooxxox
		//xxoooooox
		//xxxxxxxxx
		//
				
		File f1 = new File(mapname);
				
		Scanner sc = new Scanner(f1);    // Read the input file first lines (size, and starting positions)

		dx = sc.nextInt();
		
		dy = sc.nextInt();
		
		String tmp = sc.nextLine();
		String[] mapLines = new String[dy];
				
		/* Read the map :
		 * we assume
		 * that the map starts from top left and coordinates rise towards right and bottom
		 * We also use for calculations starting position as 0,0 (so a 10x10 map would have 
		 * bottom right position: 9,9)
		 * Also, all our tables are [y][x], so that we understand them easier. (so coordinates 2,3 are in the table index 3,2)
		 */
		
		char[][] map = new char[dy][dx];
		
		int i,j;
		for(i=0; i<dy ;i++){
			
			mapLines[i] = sc.nextLine();
			
			map[i] = mapLines[i].toCharArray();
		}
		sc.close();
	
	
	
	System.out.println("---------------MAP------------------_");
	
	for(i=0;i<dy;i++){
		for(j=0;j<dx;j++)
			System.out.print(map[i][j] + "  ");
		System.out.println();
	}
	
	System.out.println("__________________________________________________________________________");

	}