#ifndef POPULATION_BLOCK_H
#define POPULATION_BLOCK_H

#include "individual.h"

class population_block {
  individual *ind;
  population_block *next;
public:
  population_block(char p_ind_type, int p_ind_cells,
      population_block *p_next, RANDOM_GENERATOR *p_rg) {
    // defined in individual.h  ^
    ind = new individual (p_ind_type, p_ind_cells, p_rg);
    next = p_next;
  }

  population_block(individual *p_ind, population_block *p_next) {
    ind = new individual (p_ind);
    next = p_next;
  }

  ~population_block() { delete ind; }

  individual *get_individual() { return new individual (ind); }
  population_block *get_next() { return next; }

  population_block *set_next(population_block *p_next) {
    return next = p_next;
  }
};

#endif /* POPULATION_BLOCK_H */

