diff --git a/virtupet/.idea/misc.xml b/virtupet/.idea/misc.xml index 5da332e..7fdee36 100644 --- a/virtupet/.idea/misc.xml +++ b/virtupet/.idea/misc.xml @@ -1,4 +1,8 @@ +<<<<<<< HEAD + +======= +>>>>>>> 646eb1b184f47e99abdb335426ada9598f6f1429 \ No newline at end of file diff --git a/virtupet/Pudgi.py b/virtupet/Pudgi.py index 79cc785..d875b32 100644 --- a/virtupet/Pudgi.py +++ b/virtupet/Pudgi.py @@ -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 diff --git a/virtupet/data/meyers_metadata.json b/virtupet/data/meyers_metadata.json index bd53306..9b87b4e 100644 --- a/virtupet/data/meyers_metadata.json +++ b/virtupet/data/meyers_metadata.json @@ -6,6 +6,8 @@ "ESTP", "INFJ", "ISTJ", + "ESFP", + "ISFP", "INTP", "ENFP", "INTJ", diff --git a/virtupet/data/pudgies/0x11979.json b/virtupet/data/pudgies/0x11979.json new file mode 100644 index 0000000..7dd123b --- /dev/null +++ b/virtupet/data/pudgies/0x11979.json @@ -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": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x1280e.json b/virtupet/data/pudgies/0x1280e.json new file mode 100644 index 0000000..f532c64 --- /dev/null +++ b/virtupet/data/pudgies/0x1280e.json @@ -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": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x15b1.json b/virtupet/data/pudgies/0x15b1.json new file mode 100644 index 0000000..6b5cf75 --- /dev/null +++ b/virtupet/data/pudgies/0x15b1.json @@ -0,0 +1,148 @@ +{ + "uid": "0x15b1", + "name": "Tyrone", + "dna": [ + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0 + ], + "color": "White", + "personality": "INTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x1790b.json b/virtupet/data/pudgies/0x1790b.json new file mode 100644 index 0000000..aa1c336 --- /dev/null +++ b/virtupet/data/pudgies/0x1790b.json @@ -0,0 +1,84 @@ +{ + "uid": "0x1790b", + "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": "Red", + "personality": "ISTP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x17b07.json b/virtupet/data/pudgies/0x17b07.json new file mode 100644 index 0000000..b6d1bc7 --- /dev/null +++ b/virtupet/data/pudgies/0x17b07.json @@ -0,0 +1,148 @@ +{ + "uid": "0x17b07", + "name": "Lila", + "dna": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1 + ], + "color": "Green", + "personality": "ESTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x249a.json b/virtupet/data/pudgies/0x249a.json new file mode 100644 index 0000000..89f2a12 --- /dev/null +++ b/virtupet/data/pudgies/0x249a.json @@ -0,0 +1,84 @@ +{ + "uid": "0x249a", + "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": "Red", + "personality": "ISTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x3b44.json b/virtupet/data/pudgies/0x3b44.json new file mode 100644 index 0000000..ff21426 --- /dev/null +++ b/virtupet/data/pudgies/0x3b44.json @@ -0,0 +1,84 @@ +{ + "uid": "0x3b44", + "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": "Blue", + "personality": "ISTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x4be0.json b/virtupet/data/pudgies/0x4be0.json new file mode 100644 index 0000000..d44c7f3 --- /dev/null +++ b/virtupet/data/pudgies/0x4be0.json @@ -0,0 +1,84 @@ +{ + "uid": "0x4be0", + "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": "Vampire", + "personality": "INTP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x54d0.json b/virtupet/data/pudgies/0x54d0.json new file mode 100644 index 0000000..6c60f11 --- /dev/null +++ b/virtupet/data/pudgies/0x54d0.json @@ -0,0 +1,84 @@ +{ + "uid": "0x54d0", + "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": "ISTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x57e9.json b/virtupet/data/pudgies/0x57e9.json new file mode 100644 index 0000000..fcdf053 --- /dev/null +++ b/virtupet/data/pudgies/0x57e9.json @@ -0,0 +1,148 @@ +{ + "uid": "0x57e9", + "name": "Cindy", + "dna": [ + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1 + ], + "color": "Angel", + "personality": "INTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x6a86.json b/virtupet/data/pudgies/0x6a86.json new file mode 100644 index 0000000..873f6b9 --- /dev/null +++ b/virtupet/data/pudgies/0x6a86.json @@ -0,0 +1,84 @@ +{ + "uid": "0x6a86", + "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": "ESTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x6d8.json b/virtupet/data/pudgies/0x6d8.json new file mode 100644 index 0000000..c7060c1 --- /dev/null +++ b/virtupet/data/pudgies/0x6d8.json @@ -0,0 +1,148 @@ +{ + "uid": "0x6d8", + "name": "Porter", + "dna": [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0 + ], + "color": "Purple", + "personality": "ESFJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x743d.json b/virtupet/data/pudgies/0x743d.json new file mode 100644 index 0000000..eadad96 --- /dev/null +++ b/virtupet/data/pudgies/0x743d.json @@ -0,0 +1,84 @@ +{ + "uid": "0x743d", + "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": "Red", + "personality": "ENFJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0x9d3b.json b/virtupet/data/pudgies/0x9d3b.json new file mode 100644 index 0000000..3784c62 --- /dev/null +++ b/virtupet/data/pudgies/0x9d3b.json @@ -0,0 +1,84 @@ +{ + "uid": "0x9d3b", + "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": "Red", + "personality": "ESFP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0xa51.json b/virtupet/data/pudgies/0xa51.json new file mode 100644 index 0000000..0e3a89b --- /dev/null +++ b/virtupet/data/pudgies/0xa51.json @@ -0,0 +1,84 @@ +{ + "uid": "0xa51", + "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": "ISFP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0xbbec.json b/virtupet/data/pudgies/0xbbec.json new file mode 100644 index 0000000..57159bb --- /dev/null +++ b/virtupet/data/pudgies/0xbbec.json @@ -0,0 +1,148 @@ +{ + "uid": "0xbbec", + "name": "Andrew", + "dna": [ + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0 + ], + "color": "Green", + "personality": "ISFJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0xc443.json b/virtupet/data/pudgies/0xc443.json new file mode 100644 index 0000000..f9acf08 --- /dev/null +++ b/virtupet/data/pudgies/0xc443.json @@ -0,0 +1,84 @@ +{ + "uid": "0xc443", + "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": "Midnight", + "personality": "ISTJ", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/main.py b/virtupet/main.py index 3a16da8..442e75c 100644 --- a/virtupet/main.py +++ b/virtupet/main.py @@ -22,6 +22,18 @@ def main(): size = [constants.SCREEN_WIDTH, constants.SCREEN_HEIGHT] screen = pygame.display.set_mode(size) + #pygame.display.set_caption(json_object["name"]) + + active_agent_list = [] + # parents = ["0x9c08", "0x11e66"] + # agent = Pudgi(parents) + # agent = Pudgi(None, "./data/pudgies/0x9c08.json") + agent = Pudgi() + agent2 = Pudgi() + active_agent_list.append(agent) + agent.export_to_json() + active_agent_list.append(agent2) + agent2.export_to_json() pygame.display.set_caption("Pudgi Simulation") parents = ["0x9c08", "0x11e66"] @@ -38,7 +50,16 @@ def main(): agent.rect.x = 340 agent.rect.y = constants.SCREEN_HEIGHT - 140 + agent2.rect.x = 100 + agent2.rect.y = constants.SCREEN_HEIGHT - 140 + high_happiness = Pudgi.select_parents(active_agent_list) + # for parents in high_happiness: + # pudgi = Pudgi(parents) + # active_sprite_list.add(pudgi) + # active_agent_list.append(pudgi) + active_sprite_list.add(agent) + active_sprite_list.add(agent2) done = False @@ -55,6 +76,11 @@ def main(): # --------------Main While loop--------------- while not done: + for parents in high_happiness: + pudgi = Pudgi(parents) + active_sprite_list.add(pudgi) + active_agent_list.append(pudgi) + for event in pygame.event.get(): # User did something if event.type == pygame.QUIT: # If user clicked close done = True # Flag that we are done so we exit this loop @@ -94,7 +120,7 @@ def main(): pygame.display.flip() - agent.export_to_json() + # agent.export_to_json() pygame.quit()