private void buildWalls() {
		Random random = new Random();

		int procentWalls = random.nextInt(19) + 2;
		while (getElementCoverage(Wall.class) < procentWalls && (procentWalls - getElementCoverage(Wall.class)) >= 2) {
			Direction direction = validDirections[random.nextInt(2)];

			int randomLength = 1;
			int randomX, randomY;

			if (direction == Direction.RIGHT) {
				randomLength = 2 + random.nextInt((grid.width / 2) - 2);
				int margin = grid.width - randomLength;
				randomX = random.nextInt(margin);
				randomY = random.nextInt(grid.height);
			} else {
				randomLength = 2 + random.nextInt((grid.height / 2) - 2);
				int margin = grid.height - randomLength;
				randomY = random.nextInt(margin);
				randomX = random.nextInt(grid.width);
			}
			final Position position = new Position(randomX, randomY);
			final List<Position> wallPositions = getPositions(position, direction, randomLength);
			if (canHaveAsWall(wallPositions, true) && getElementCoverage(Wall.class) + randomLength <= procentWalls)
				for (Position pos : wallPositions)
					grid.addElementToPosition(new Wall(grid), pos);
		}
	}