Example #1
0
 /// <summary>
 /// Takes in 2 Monsters and take there genetics and create an egg with both genetics and return it
 /// </summary>
 /// <param name="father"></param>
 /// <param name="mother"></param>
 /// <returns></returns>
 internal Egg MateMonsters(Monster father, Monster mother)
 {
     Egg egg = new Egg(father.Genetic, mother.Genetic);
     return egg;
 }
Example #2
0
 private void createEgg()
 {
     Console.Clear();
     Egg egg = new Egg("11111111", "11111111");
     player.Eggs.Add(egg);
     Console.WriteLine("creating an egg and putting the egg in the inventory");
     Console.WriteLine("Press Enter to continue...");
     Console.ReadLine();
     Console.Clear();
 }
Example #3
0
 /// <summary>
 /// Takes in an egg as param and then calls fitness on it to find out what genetics the new Monster should have
 /// then sets the new fitness to the Monster and returns it
 /// </summary>
 /// <param name="egg"></param>
 /// <returns></returns>
 internal Monster HatchEgg(Egg egg)
 {
     Monster tama = new Monster();
     tama.Genetic = fitness(egg.Father, egg.Mother, egg.GeneticCrossover);
     return tama;
 }