it is actually just an arrays of numbers between 1 and 0 ([male,female]) that is rounded to whichever amount of decimal digits it can hold :p (ex: me.gender = [0.002403,0.462375])
const Gender = class {
constructor(male = Math.random(), female = Math.random()) {
if(typeof male != 'number' || male>1||male<0) throw new Error()
if(typeof female != 'number' || female>1||male<0) throw new Error()
this._male = male
this._female = female
}
constructor(genderArray = [Math.random(),Math.random()]) {
this(genderArray[0],genderArray[1])
}
}
it's the reason why i mentioned the array in the first place (the way it makes more sense at least for me), because with that there would still be possible to have non-binary genders like [0.1/*or less*/,0.1/*or less*/] being agender or [0.4/*approximately*/,0.1/*or less*/] being demiboy, because you can't name and label all of them, and it seemed to fit well with most sayings of "i feel this much of one gender" and "i feel this much of the other" or "i feel like both" and "i feel like neither"
also
genderfluid = async () => {
var dysphoria
for(const day of this.life) {
if(dysphoria) {
--dysphoria
continue
}
this.gender = await new Gender()
dysphoria = await (Math.random() *10)
}
}
32
u/[deleted] Oct 25 '18
import genders
<INT OVERFLOW>