Skip to content

Commit

Permalink
allow pudgis to move autonomously
Browse files Browse the repository at this point in the history
  • Loading branch information
Kcunningham20 committed May 1, 2018
1 parent 8594dfc commit af9e704
Show file tree
Hide file tree
Showing 68 changed files with 10,214 additions and 14 deletions.
9 changes: 9 additions & 0 deletions virtupet/Pudgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,12 @@ def make_decision(self):
print("Times chosen: " + str(self.known_decisions[choice_index]["count"]))
print("---------------------------------------------")
print(str(self.name) + "'s Happiness: " + str(self.happiness))

def movement(self, direction):
if direction == "L" and self.rect.x > 0:
self.go_left()
elif direction == "R" and self.rect.x < 760:
self.go_right()
else:
self.stop()

153 changes: 153 additions & 0 deletions virtupet/data/pudgies/0x1027e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"uid": "0x1027e",
"name": "Libby",
"dna": [
1,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
0,
1,
0,
1,
1,
1,
1,
0,
1,
0,
1,
1,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
1,
1,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
1,
0,
0,
0,
1,
1,
0,
1,
0,
0,
1,
0,
0,
0,
1,
0,
1,
0,
0,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
0,
0,
1,
0,
0,
0,
1,
0,
0,
1,
1,
0,
1,
0,
1,
1,
1,
0,
1,
1,
0,
0,
0,
1,
1
],
"color": "Blue",
"personality": "ISFP",
"parents": [
null,
null
],
"happiness": 3.0,
"known_decisions": [
{
"name": "nothing",
"count": 0
}
]
}
157 changes: 157 additions & 0 deletions virtupet/data/pudgies/0x10617.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"uid": "0x10617",
"name": "Kaylen",
"dna": [
1,
0,
0,
1,
1,
0,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
0,
1,
0,
1,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
1,
0,
0,
0,
1,
0,
1,
1,
1,
0,
0,
0,
1,
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
1,
0,
1,
0,
1,
1,
1,
0,
1,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
0,
1,
1,
1,
0,
0,
1,
1,
0,
1,
0,
1,
1,
0,
1,
1,
0,
0,
0,
1,
0,
0,
1,
1,
1,
0,
0,
1,
1,
0,
0,
0,
1,
1,
0,
1,
0,
0,
0,
1,
1,
1,
0,
1,
1,
0,
1
],
"color": "White",
"personality": "ISFJ",
"parents": [
null,
null
],
"happiness": 4.998777911518327,
"known_decisions": [
{
"name": "nothing",
"count": 0
},
{
"name": "meditate",
"count": 1
}
]
}
Loading

0 comments on commit af9e704

Please sign in to comment.