﻿using CommonGeneticAlgorithm.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonGeneticAlgorithm.Implemetations.NameTest
{
    public class NameGeneFactory : NameMutogen, IGeneFactory<NameGene>
    {
        public NameGeneFactory(Random rand, string[] nameArray) : base(rand, nameArray)
        {

        }

        public NameGene CreateGene()
        {
            return new NameGene() { Name = nameArray[rand.Next(0, nameArray.Length)] };
        }
    }
}
