Introduced Eggs.

Every tamagotchi will spawn an egg, all the time(DEBUG)
This commit is contained in:
luxick
2016-02-26 19:04:12 +01:00
parent 07abef887c
commit 07af201350
4 changed files with 46 additions and 3 deletions

21
egg.py Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
class Egg:
alive = True
age = 0
care = 100
def __init__(self):
self.alive = True
self.age = 0
self.care = 100
def step(self):
if self.alive:
if self.care >= 0:
age += 1
else:
self.alive = False