Cleaned up gene comparison method

This commit is contained in:
SimpleArt
2020-12-29 19:36:06 -05:00
parent 57756833dc
commit 6aa4b8b82f

View File

@ -16,13 +16,7 @@ class Gene:
def __eq__(self, other_gene):
"""Comparing two genes by their value."""
try:
other_value = other_gene.value
except:
other_value = other_gene
return self.value == other_value
return self.value == Gene(other_value).value
def __repr__(self):