Ejemplo n.º 1
0
    public void Crossover(Chameleon parent1, Chameleon parent2, Chameleon chameleon)
    {
        float red   = (parent1.m_Red + parent2.m_Red) / 2.0f;
        float green = (parent1.m_Green + parent2.m_Green) / 2.0f;
        float blue  = (parent1.m_Blue + parent2.m_Blue) / 2.0f;

        chameleon.Initialize(red, green, blue);
    }