Skip to content
Snippets Groups Projects
Commit f69eee32 authored by Tim Huppertz's avatar Tim Huppertz Committed by Nik | Klampfradler
Browse files

Added weight contraints.

parent 748973b4
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,11 @@ class Koala():
elif name == "sickness" and value < 0:
value = 0
if name == "weight" and value > 60:
value = 60
elif name == "weight" and value < 10:
value = 10
self.__dict__[name] = value
def update(self):
......@@ -199,7 +204,7 @@ class Koala():
def feed(self):
self.hunger -= 2
self.dirtiness += 0.5
self.weight += 1
self.weight += 0.5
def turn(self):
self.happiness += 3
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment