@Override
    public void setDNA(int[] dna) {

        this.dna = new int[boardLength];
        int newDNASize = dna.length;

        for (int i = 0; i < boardLength; i++)
            this.dna[i] = (i < newDNASize && dna[i] > 0 && dna[i] < boardLength) ? dna[i] : 0;

        fitnessScore = determineFitness();
    }