private static GameField parseSquares(Scanner scanner)
			throws MapLoaderException {
		int width = scanner.nextInt();
		int height = scanner.nextInt();

		if (!scanner.next().equals("SQUARES")) {
			throw new MapLoaderException("Squares section not found.");
		}

		Square[][] map = new Square[width][height];

		char squareChar;

		for (int i = 0; i < height; ++i) {
			for (int j = 0; j < width; ++j) {
				squareChar = scanner.next().charAt(0);

				SquareTag tag = SquareTag.getName(squareChar);
				if (tag == null) {
					throw new MapLoaderException(
							String.format(
									"Invalid character in SQUARES section at (%d, %d) position.",
									i, j));
				}

				switch (tag) {
				case GRASS:
					map[i][j] = Square.GRASS;
					break;
				case MOUNTAIN:
					map[i][j] = Square.MOUNTAIN;
					break;
				case WATER:
					map[i][j] = Square.WATER;
					break;
				case TREE:
					map[i][j] = Square.TREE;
					break;
				default:
					throw new MapLoaderException(
							String.format(
									"Invalid character in SQUARES section at (%d, %d) position.",
									i, j));
				}
			}
		}

		return new GameField(width, height, map);
	}