Esempio n. 1
0
        public Character(Database db, DNA dna, GTime time, int id) : this(db)
        {
            List <Gene> genes = dna.Genes;
            this.CID       = id;
            this.BirthTime = time;
            this.Dead      = false;
            this.DueDate   = new GTime(true);
            this.IsSingle  = true;
            this.Dna       = dna;

            // Gene Pair 1
            int gone = genes[0].ToInt() % 2;
            int gtwo = genes[1].ToInt() % 2;

            if (gone + gtwo == 1)
            {
                this.Gender = true;
            }

            else if (gone + gtwo == 0)
            {
                this.Gender = false;
            }

            else
            {
                Console.WriteLine("{0} has two y chromosomes", id);
            }

            this.Fname = NDB.GenFname(this.Gender);

            this.Lname = NDB.GenLname();
        }
Esempio n. 2
0
 public Character(Database db, Character dad, Character mom, GTime time, int id) : this(db, new DNA(dad.Dna.Miosis(), mom.Dna.Miosis()), time, id)
 {
     this.Fname = NDB.GenFname(this.Gender);
     this.Lname = dad.Lname;
 }