moved global variables to a seperate config file
This commit is contained in:
15
test.py
15
test.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user