public Population getPopulation(TokenResolver tokenResolver) throws Exception {
        population = new Population();
        for (String line : lines) {
            if (line.isEmpty())
                continue;
            int openIndex = line.indexOf("(");
            if (openIndex == -1) {
                throw new Exception("Malformated metadata");
            }
            String term = line.substring(0, openIndex);
            String args = line.substring(openIndex + 1, line.lastIndexOf(")"));
            
            
            if (term.equals("Vilin")) {
                population.addSprite(Vilin.getFromArgs(args, tokenResolver));
            } else if (term.equals("GravityZone")) {
                population.getGravitationalFeild().getGravitySources().add(GravityZone.getFromArgs(args, tokenResolver));
            } else if (term.equals("Turret")) {
                population.addSprite(Turret.getFromArgs(args, tokenResolver));
            } else if (term.equals("Missle")) {
                population.addSprite(Missle.getFromArgs(args, tokenResolver));
            }
        }
        return population;
    }