Skip to content
Snippets Groups Projects
Commit 6a8e0228 authored by Pregmodder's avatar Pregmodder
Browse files

name corrections

parent 8f918327
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ window.generateGenetics = (function() {
: 0;
genes.gender = setGender(father);
genes.name = setName(x);
genes.name = setName(x, activeMother);
genes.mother = setMotherID(actor1);
genes.motherName = setMotherName(activeMother);
genes.father = setFatherID(actor2);
......@@ -67,7 +67,7 @@ window.generateGenetics = (function() {
}
// name
function setName(x) {
function setName(x, activeMother) {
return "ovum" + x;
}
......@@ -79,7 +79,7 @@ window.generateGenetics = (function() {
// motherName
function setMotherName(activeMother) {
let motherName;
if (actor1 == -1) {
if (activeMother.ID == -1) {
motherName = activeMother.name;
if (activeMother.surname !== 0 && activeMother.surname !== "") { motherName + " " + activeMother.surname; }
} else {
......@@ -105,8 +105,8 @@ window.generateGenetics = (function() {
fatherName = activeFather.slaveName;
if (activeFather.slaveSurname !== 0 && activeFather.slaveSurname !== "") { fatherName + " " + activeFather.slaveSurname; }
}
return fatherName;
}
return fatherName;
}
// nationality
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment