private void parseTerrain(InputStream terrain){
        try {
            Scanner scanner = new Scanner(terrain);
            int gridSize = new Integer(scanner.nextLine());
            grid = new Grid(gridSize);
            String line, className;
            int row = 0;
            int col = 0;
            Plant current;
            Location loc;
            while (scanner.hasNext()) {
                col = 0;
                line = scanner.nextLine();
                line = line.replaceAll("[^A-Za-z_]", "");
                for (char symbol : line.toCharArray()){
                    className = symbolToClassnameMap.get(symbol);
                    if (className != null) {
                        loc = new Location(row, col);
                        // IF MORE PLANTS ARE ADDED, ADD THEM HERE (IN AN ELSE IF)
                        if (className.equals("Grass")) {
                            current = new Grass(loc);
                        } else if (className.equals("Clover")) {
                            current = new Clover(loc);
                        } else if (className.equals("Log")) {
                            current = new Log(loc);
                        } else if (className.equals("Berry")) {
                            current = new Berry(loc);
                        } else {
                            current = null;
                        }
                        grid.addPlant(current, loc);
                    }
                    col++;
                }
                row++;
            }
        } catch (Exception e) {
            Debug.echo("Terrain: Invalid file format! "+e);
        }
    }