moved global variables to a seperate config file

This commit is contained in:
luxick
2015-07-26 22:14:21 +02:00
parent 0c6e2cbdf2
commit 187df5697a
9 changed files with 50 additions and 29 deletions

15
test.py
View File

@@ -2,18 +2,15 @@
from mayorgotchi import Mayorgotchi
from util import Util
from config import *
import time
import curses
# Temporary test section
# Variable Definition
decayaspeed = 1
ticks = 200000
show_pct = True
list = []
ticks = 0
for n in range(0,50):
list.append(Util().make_Tamagotchi())
@@ -27,16 +24,18 @@ curses.curs_set(0)
screen.keypad(1)
screen.nodelay(1)
for n in range (0, ticks):
while True:
screen.move(0,0)
mayor.step()
screen.addstr('----------------------After '+str(n)+' ticks------------------------------\n')
screen.addstr('Simulation running. Press [q] to exit.\n')
screen.addstr('----------------------After '+str(ticks)+' ticks------------------------------\n')
screen.addstr(mayor.give_status(show_pct))
ticks += 1
screen.clrtobot()
key = screen.getch()
if key == ord('q'):
break
elif key < 0:
time.sleep(0.5)
time.sleep(0.1)
curses.endwin()