Exemple #1
0
    public Block Mutate(float noice)
    {
        Block mutation = new Block();

        mutation.MountainEntities = new List <Mountain>();
        foreach (Mountain mountain in this.MountainEntities)
        {
            mutation.MountainEntities.Add(mountain.Mutate(noice));
        }
        EvalBlock eval = new EvalBlock();

        eval.BlockGrade(mutation);
        return(mutation);
    }
Exemple #2
0
    private void GenerateMutateAndRelease()
    {
        Block bestBlock = null;

        //Create Blocks
        for (int i = 0; i < 12; i++)
        {
            EvalBlock eval = new EvalBlock();
            Block     tmp  = new Block();
            eval.BlockGrade(tmp);
            TemporalBlockQueue.Add(tmp);
        }

        // Debug.Log("Initial > : " + _PrintQueue());
        for (int i = 0; i < 5; i++)
        {
            _ReduceAndMutate();
            // Debug.Log("Mutation #" + (i + 1) + ": " + _PrintQueue());
        }

        bestBlock = TemporalBlockQueue[TemporalBlockQueue.Count - 1];
        Debug.Log("[MUTATOR] ===================== ADDED TO QUEUE BLOCK G: " + bestBlock.grade);
        Mutate.BlockQueue.Enqueue(bestBlock);
    }