added Kinggotchi, multiple Villages in Kingdom
This commit is contained in:
19
test.py
19
test.py
@@ -1,20 +1,24 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
from mayorgotchi import Mayorgotchi
|
||||
from kinggotchi import Kinggotchi
|
||||
from util import Util
|
||||
from config import *
|
||||
import time
|
||||
import curses
|
||||
|
||||
# Temporary test section
|
||||
|
||||
list = []
|
||||
ticks = 0
|
||||
for n in range(0,startnr):
|
||||
list.append(Util().make_Tamagotchi())
|
||||
|
||||
mayor = Mayorgotchi(list)
|
||||
def make_list(number):
|
||||
list = []
|
||||
for n in range(0,number):
|
||||
list.append(Util().make_Tamagotchi())
|
||||
return list
|
||||
|
||||
king = Kinggotchi()
|
||||
for n in range(0, 10):
|
||||
king.add_village(Mayorgotchi(make_list(startnr)))
|
||||
|
||||
screen = curses.initscr()
|
||||
curses.noecho()
|
||||
@@ -24,11 +28,10 @@ screen.nodelay(1)
|
||||
|
||||
while True:
|
||||
screen.move(0,0)
|
||||
mayor.step()
|
||||
screen.addstr('Simulation running. Press [q] to exit.\n')
|
||||
screen.addstr('----------------------After '+str(ticks)+' ticks------------------------------\n')
|
||||
#screen.addstr(mayor.give_status(show_pct))
|
||||
screen.addstr(mayor.give_overview())
|
||||
screen.addstr(king.show_kingdom())
|
||||
king.step()
|
||||
ticks += 1
|
||||
|
||||
screen.clrtobot()
|
||||
|
||||
Reference in New Issue
Block a user