Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ngraham20 committed Apr 24, 2018
2 parents 07f85e5 + 6ba19cf commit e859852
Show file tree
Hide file tree
Showing 21 changed files with 1,859 additions and 4 deletions.
4 changes: 4 additions & 0 deletions virtupet/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions virtupet/Pudgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,21 @@ def export_to_json(self):
print("Parents: " + str(self.parents))
return

def select_parents(self, active_sprite_list):
@staticmethod
def select_parents(active_agent_list):
"""
:param active_sprite_list:
:type active_sprite_list: list
:param active_agent_list:
:type active_agent_list: list
:return:
"""

high_happiness = []
parents = []
for pudgi in active_agent_list:
if pudgi.happiness > .8:
high_happiness.append(pudgi.uid)
for i in range(len(high_happiness)):
if len(high_happiness) >= 2:
parents.append((high_happiness.pop(), high_happiness.pop()))

return parents
2 changes: 2 additions & 0 deletions virtupet/data/meyers_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"ESTP",
"INFJ",
"ISTJ",
"ESFP",
"ISFP",
"INTP",
"ENFP",
"INTJ",
Expand Down
84 changes: 84 additions & 0 deletions virtupet/data/pudgies/0x11979.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"uid": "0x11979",
"name": "Pudgi",
"dna": [
0,
1,
0,
1,
0,
1,
1,
0,
0,
1,
1,
1,
1,
0,
0,
0,
1,
1,
1,
0,
0,
0,
1,
1,
0,
0,
1,
0,
0,
0,
0,
1,
0,
1,
0,
1,
1,
1,
1,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
1,
1,
0,
1,
1
],
"color": "White",
"personality": "ENFP",
"parents": [
null,
null
],
"happiness": 0.5,
"known_decisions": []
}
148 changes: 148 additions & 0 deletions virtupet/data/pudgies/0x1280e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"uid": "0x1280e",
"name": "Marvin",
"dna": [
1,
0,
0,
0,
1,
1,
1,
1,
1,
1,
1,
0,
0,
1,
1,
1,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
1,
1,
0,
0,
1,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
1,
1,
0,
0,
0,
1,
0,
1,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
1,
1,
0,
1,
1,
0,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1,
1,
0,
0,
1,
0,
1,
0,
0,
1,
0,
1,
1,
0,
1,
0,
1,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0,
1,
0,
1,
1,
1,
0,
0,
0,
0,
1,
1
],
"color": "Red",
"personality": "INTP",
"parents": [
null,
null
],
"happiness": 0.5,
"known_decisions": []
}
Loading

0 comments on commit e859852

Please sign in to comment.