Categorical crossingover

This commit is contained in:
rendo 2026-04-06 10:51:07 +05:00
commit 66a4c4fa46
3 changed files with 13 additions and 7 deletions

View file

@ -47,7 +47,17 @@ impl ReferencePairModifier {
let (genome_a,genome_b) = pair.allelic_crossingover(None);
self.godot_genome_a.as_mut().unwrap().bind_mut().set_genome(genome_a);
self.godot_genome_b.as_mut().unwrap().bind_mut().set_genome(genome_b);
godot_print!("Kukayan");
}
else {
godot_error!("Modifier is not initialized!");
}
}
#[func]
fn categoric_crossingover(&mut self) {
if let Some(pair) = self.modifier.as_mut() {
let (genome_a,genome_b) = pair.categoric_crossingover(None);
self.godot_genome_a.as_mut().unwrap().bind_mut().set_genome(genome_a);
self.godot_genome_b.as_mut().unwrap().bind_mut().set_genome(genome_b);
}
else {
godot_error!("Modifier is not initialized!");