Пример #1
0
        //do crossover with partner Snake
        public BotSnake Crossover(BotSnake partner)
        {
            BotSnake Child = new BotSnake();

            Child.brain = brain.Crossover(partner.brain);
            return(Child);
        }
Пример #2
0
        //clone brain of current snake
        public BotSnake Clone()
        {
            BotSnake clonedSnake = new BotSnake();

            clonedSnake.brain  = brain.Clone();
            clonedSnake.isDead = false;
            return(clonedSnake);
        }
Пример #3
0
 //do crossover with partner Snake
 public BotSnake Crossover(BotSnake partner)
 {
     return(new BotSnake {
         brain = this.brain.Crossover(partner.brain)
     });
 }