Exemplo n.º 1
0
        //do crossover with partner Snake
        public BotSnake Crossover(BotSnake partner)
        {
            BotSnake Child = new BotSnake();

            Child.brain = brain.Crossover(partner.brain);
            return(Child);
        }
Exemplo n.º 2
0
        //clone brain of current snake
        public BotSnake Clone()
        {
            BotSnake clonedSnake = new BotSnake();

            clonedSnake.brain  = brain.Clone();
            clonedSnake.isDead = false;
            return(clonedSnake);
        }
Exemplo n.º 3
0
 //do crossover with partner Snake
 public BotSnake Crossover(BotSnake partner)
 {
     return(new BotSnake {
         brain = this.brain.Crossover(partner.brain)
     });
 }