-
Notifications
You must be signed in to change notification settings - Fork 0
/
dna.py
44 lines (35 loc) · 790 Bytes
/
dna.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
======================================
| name ,code,active,comment|
----------------------------
| |
======================================
"""
class gene:
def __init__(self):
self.id_ = id_
self.name = name
self.active = state
self.comment = comment
self.code = []
class DNA:
def __init__(self):
self.dna =list()
def addGene(self,name,active,comment,code):
pass
def removeGene(self,_id):
pass
def crossOver(self,dna2,_type_ = 1):
pass
def readDna(self):
pass
def modifyGene(self,_id):
pass
def activateGene(self,_id):
pass
def deactivateGene(self,_id):
pass
def randomDna(self):
pass
def mutateDna(self):
pass