From a49ceda93c1807bf3e934e3ede18854dbba86dd3 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Sat, 7 Nov 2020 18:33:59 -0500 Subject: [PATCH] Added save_chromosome --- src/attributes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.py b/src/attributes.py index 1cbd0c2..896d97f 100644 --- a/src/attributes.py +++ b/src/attributes.py @@ -130,6 +130,11 @@ class Attributes: self.database.insert_current_population(self) + def save_chromosome(self, chromosome): + """Saves the given chromosome to the database.""" + self.database.insert_current_chromosome(self.current_generation, chromosome) + + # Getter and setters for all required varibles @property def chromosome_length(self):